# Text Prefix/Suffix

Add prefix or suffix to each line or word

> Canonical page: https://elysiatools.com/en/tools/text-prefix-suffix

- **Category:** Text Processing

- **Keywords:** text, prefix, suffix, add, Text Prefix/Suffix

## Overview

The Text Prefix/Suffix tool allows you to quickly append custom characters, words, or formatting strings to your text data. Whether you need to format lists, prepare code snippets, or standardize data entries, this utility automates the process of adding prefixes and suffixes to individual lines, words, or the entire text block.

## Inputs

- **Text Input** (textarea): Enter text to process...
- **Target Type** (select)
- **Prefix** (text): Enter prefix text...
- **Suffix** (text): Enter suffix text...
- **Apply To** (select)

## When to use

- When you need to format a list of items for code arrays or database queries.
- When you want to add specific labels or units to every line in a dataset.
- When you need to wrap words or lines in quotes, brackets, or HTML tags.

## How it works

- Paste your content into the text input area.
- Select whether to apply changes to each line, each word, or the whole text block.
- Enter your desired prefix or suffix strings.
- Choose whether to apply both, or just one, and click process to generate your formatted text.

## Use cases

- Preparing a list of email addresses by adding a comma suffix for bulk mailing.
- Wrapping a list of variables in quotes and commas for JavaScript array initialization.
- Adding HTML tags like- or to a list of items for web development.

## Frequently asked questions

### Can I add both a prefix and a suffix at the same time?

Yes, select 'Both Prefix and Suffix' in the 'Apply To' option to add both simultaneously.

### Does this tool work with large blocks of text?

Yes, you can process large amounts of text, and the tool will apply your settings to every line or word as specified.

### Can I apply a prefix to only specific words?

The tool applies the prefix or suffix to every word in the text if you select the 'Each Word' target type.

### Is the formatting permanent?

The tool generates a new version of your text with the added prefixes or suffixes; your original input remains unchanged until you replace it.

### Does this tool support special characters?

Yes, you can use any characters, including symbols, punctuation, or whitespace, as your prefix or suffix.

## Related tools

- [Line Number Adder](https://elysiatools.com/en/tools/line-number-adder): Add line numbers to text or code with customizable formatting options
- [Markdown List Formatter](https://elysiatools.com/en/tools/markdown-list-formatter): Convert each line of text into Markdown list items or numbered lists
- [Prefix Remover](https://elysiatools.com/en/tools/prefix-remover): Remove common prefixes from each line with intelligent detection and customizable options
- [Suffix Remover](https://elysiatools.com/en/tools/suffix-remover): Remove common suffixes from each line with intelligent detection and customizable options
- [Add a Prefix to Text Lines](https://elysiatools.com/en/tools/text-add-prefix-lines): Quickly prepend a prefix to one or more text lines
- [Add a Prefix to Words](https://elysiatools.com/en/tools/text-add-prefix-words): Quickly prepend a prefix to all words in text
- [Add a Suffix to Text Lines](https://elysiatools.com/en/tools/text-add-suffix-lines): Quickly append a suffix to one or more text lines
- [Add a Suffix to Words](https://elysiatools.com/en/tools/text-add-suffix-words): Quickly append a suffix to all words in text

## Samples

- [Text with Emoji Samples](https://elysiatools.com/en/samples/text-with-emoji-samples): Mixed language text containing various Unicode emojis for testing emoji extraction
- [Chinese-English Mixed Text Samples](https://elysiatools.com/en/samples/text-chinese-english-mixed-samples): Sample text files with mixed Chinese and English content for testing automatic spacing tools
- [Text Case Format Samples](https://elysiatools.com/en/samples/text-case-formats): Examples of different text case formats: camelCase, snake_case, kebab-case, PascalCase, and more
- [Text with Chinese Samples](https://elysiatools.com/en/samples/text-with-chinese-samples): Mixed language text containing Chinese characters for testing Chinese extraction
