Seven Bracket Pairs and Custom Delimiters
Wrap text with one of seven delimiter pairs or your own custom prefix and suffix. Choose which text units to wrap and how to serialize the result. This is a text formatter, not a tournament-bracket maker, code parser or JSON object builder. The jobs it covers: labeling each nonblank line without changing its line-ending spelling, adding multi-character or one-sided delimiters to a draft, exporting one string or a fenced block for documentation examples (check it in your renderer), and wrapping complete graphemes instead of splitting an emoji or accent sequence.
Choosing a Style, an Apply Mode and a Format
- Enter Original text.
- Choose Bracket Style from the selector or a keyboard-accessible style button. For Custom Brackets, enter Open and Close delimiters.
- Choose Apply Mode and Output Format, then select Generate Brackets.
- Review Result and use Copy. Select the result box for manual copying if access fails.
What Each Apply Mode and Format Wraps
Entire Text wraps the whole nonempty input. Token mode wraps non-whitespace runs, including their punctuation. Line mode keeps CRLF, lone CR and LF separators. Paragraph mode splits on at least two line endings with optional blank-line whitespace; single line breaks stay inside a paragraph. Blank units stay unchanged in those split modes.
Punctuation chunks end after a run of periods, exclamation marks or question marks followed by whitespace or end of input. This is a heuristic, so abbreviations such as Dr. can split. Leading and trailing chunk whitespace stays outside the brackets. Each Grapheme wraps non-whitespace combined characters, keeping emoji sequences and accents intact.
HTML Text Entities escapes text characters including ampersands before angle brackets and quotes. It is not HTML sanitization or attribute escaping. JSON String serializes one string; JavaScript String additionally escapes U+2028/U+2029. Markdown Code Block chooses a backtick fence longer than any run inside the result and adds a terminating line break when needed.
References for the format rules: HTML character references, JSON.stringify documentation and CommonMark fences.
Four Verified Wrapping Examples
| Input and settings | Output |
|---|---|
| Apple, LF, Banana: Each Line, Plain Text | [Apple] [Banana] |
| A & B: Entire Text, HTML Text Entities | [A & B] |
| ab: Each Grapheme, Plain Text | [a][b] |
| ab: Entire Text, JSON String | "[ab]" |
What Added Brackets Do Not Fix
Adding braces does not make prose a valid object, array, tag or database statement. Existing unmatched brackets are not repaired. Punctuation chunks are not linguistic sentences, and token mode is not a word tokenizer.
Plain wrapping preserves the supplied text units and separators. HTML/JSON/JavaScript formats deliberately encode characters; Markdown adds a fence and may add a final newline. These are not interchangeable outputs or guarantees of acceptance in another app.
Input limits are 100,000 UTF-16 units and 25,000 grapheme clusters. Unsupported controls and incomplete Unicode sequences are rejected; source tabs and line breaks are allowed. Output is limited to 1,000,000 UTF-16 units before and after serialization. Errors clear Result without shortening it.
Start with Plain Text to inspect the wrapping. Then choose a serialized format for the specific receiving context. Preserve a source copy, check blank lines and abbreviations, and regenerate after each edit.
Share This Brackets Generator
Help friends discover this free online tool!