# Text Formatter

> Reformat text with 36 transforms: swap delimiters, sort and shuffle lines, clean whitespace, strip HTML, extract emails and URLs, add prefixes, and more.

- Open the tool: https://overtooled.com/text-formatter
- Category: Text Tools
- Privacy: Runs entirely in your browser. Nothing is uploaded, no account is needed, and it works offline once loaded.
- Price: free, no sign-up
- Keywords: format, delimiter, comma, space, newline, remove, punctuation, sort, deduplicate, wrap, prefix, suffix, clean, reformat, convert

## In short

36 text transforms: delimiter swaps, line sorting, whitespace cleanup, HTML stripping, email/URL extraction, and more.

## Overview

A toolbox of 36 toggleable text transforms (delimiter swaps, removals, whitespace cleanup, line operations, prefixes and suffixes, HTML stripping, email and URL extraction) that can be combined and are applied in a fixed order. Use it to reshape lists and data, for example turning comma-separated values into one item per line.

## Features

- Remove: custom string, find & replace (literal), commas, punctuation and symbols (letters of any script, digits and whitespace are kept), digits, letters (any script), first N characters of the text
- Delimiters: commas to spaces, spaces to commas (with or without a following space), spaces to newlines, newlines to spaces, newlines to commas (with or without a space), commas to newlines
- Whitespace: collapse repeated spaces, remove all spaces, trim each line, remove blank lines
- Lines: sort (localeCompare), deduplicate (exact match), reverse, shuffle (Fisher-Yates with Math.random), number as "1. ", "2. "
- Tabs: tabs to spaces and leading spaces to tabs, with a tab width setting (default 2)
- Clean: strip HTML tags; straight quotes (curly quotes to straight, the ellipsis character to "...", en and em dashes to "-")
- Extract: email addresses or URLs (http/https, www., and bare domains with common TLDs), one per line, de-duplicated
- Wrap: wrap each line in a character (default "), add a prefix or suffix to each line, append text to the end, or insert text before or after every occurrence of a target string
- Each transform button shows a before/after example; a filter box searches the transforms; Clear all turns them all off
- Shows original and result character counts and how many transforms were applied; copy and pipeline buttons on the output

## How to use it

1. Paste text into the Input box.
2. Click one or more transform buttons (use the filter box to find one).
3. Fill in any option fields that appear (e.g. prefix, find text, tab width).
4. Copy the Output.

## Inputs

- Any plain text
- Option values for the transforms that need them (strings, N, tab width 1-8, wrap character up to 4 characters)

## Outputs

- Transformed text with a copy button

## Limits and notes

- Transforms run in a fixed order, not the order you click: custom remove/replace, removals, delimiter swaps, whitespace, sort and dedupe, wrap/prefix/suffix/append, targeted inserts, reverse/shuffle/number, tabs, strip HTML and quotes, then extraction.
- Remove first N characters removes N characters from the start of the whole text, not from each line.
- Remove punctuation also removes symbols and emoji.
- Strip HTML is a simple tag-removing regex; it does not decode entities like &amp; and leaves the contents of <script> and <style> in place.
- Settings and text are not saved, and nothing is uploaded.

## Questions and answers

### How does the Text Formatter work?

The tool has 36 independent transforms, each a pure function that takes text in and returns text out. The ones you toggle on run in a fixed order: custom remove and replace, character removals, delimiter swaps, whitespace cleanup, sort and deduplicate, wrap/prefix/suffix/append, targeted inserts, reverse/shuffle/number lines, tab conversion, HTML stripping and straight quotes, and finally email or URL extraction.

### How do I convert a comma-separated list to one item per line?

Paste your list into the input, then click the "Commas to newlines" preset or toggle. Each comma-separated value becomes its own line instantly.

### Can I apply multiple transforms at once?

Yes. Toggle as many transforms as you need. They always apply in a fixed order, not the order you click: removals, delimiter swaps, whitespace cleanup, sort and dedupe, wrapping and prefixes, reverse/shuffle/number, tabs, cleaning (HTML and quotes), then extraction.

### Does it work with tool chaining?

Yes. Text Formatter is fully chainable. Pipe output from any other tool through it to reshape the text before passing it to the next tool in your chain.

## Related tools

- [Bibliography / Citation Helper](https://overtooled.com/bibliography-helper.md): Generate MLA, APA, and Chicago style citations for books, articles, and websites
- [Markdown to HTML](https://overtooled.com/markdown-to-html.md): Convert Markdown to HTML with live side-by-side preview
- [Remove Duplicate Lines](https://overtooled.com/remove-duplicates.md): Remove duplicate lines from lists and text instantly
- [Sort Lines](https://overtooled.com/sort-lines.md): Sort lines alphabetically, numerically, by length, or reversed

---
Overtooled: 179 free tools that run in your browser. Index of all tools: https://overtooled.com/llms.txt
