Skip to content

Text Formatter

One click turns a messy paste into a clean article: paragraphs rejoined, indentation applied, punctuation width normalized and CJK-Latin spacing fixed.

Privacy: your files never leave your device. All processing happens locally in your browser.

How to use

  1. 1.Paste the messy text, straight from a PDF, email, chat log or content system.
  2. 2.Click one of the presets: article formatting for CJK or English, or plain whitespace cleanup.
  3. 3.Fine-tune any single rule in the advanced section if needed, then copy the result.

About Text Formatter

Text Formatter is a one-click typesetting tool for text that arrives in a mess: articles copied out of PDFs, emails, chat windows or content systems, where every line is hard-wrapped mid-sentence, paragraphs have lost their indentation, punctuation is a mix of widths and blank lines multiply. One button applies a coherent set of typesetting rules and returns an article that reads the way it was meant to.

Three presets cover the common cases. Format as article, CJK, is built for Chinese, Japanese and Korean prose: it rejoins hard-wrapped lines into real paragraphs, indents each paragraph with two ideographic spaces in the East Asian convention, converts half-width punctuation to its full-width form where it follows CJK text, collapses runs of three or more periods into a proper ellipsis, inserts the customary space between CJK characters and adjacent Latin words or digits, and normalizes blank lines to a single separator. Format as article, English, does the Latin-script equivalent: paragraphs rejoined with single spaces at the joins, no indent, full-width punctuation brought back to half-width, whitespace tidied. Plain cleanup is the conservative third option, applying only line trimming, space collapsing and blank-line limits without touching your paragraph structure at all.

Every rule is also an individual control in the advanced section, so the presets are conveniences rather than a cage. The reflow rule is the heart of the tool: a line that does not end in sentence-final punctuation is joined to the next line, with a space inserted for Latin joins and none when either side of the join is a CJK character, and a blank line always survives as a paragraph separator. The punctuation converter is deliberately context-aware: a comma following Chinese text becomes a full-width comma, while the commas in 3,000 or in an English sentence are left strictly alone, because a width converter that cannot tell those apart does more damage than good. The spacing rule follows the widely observed CJK typesetting convention documented in the W3C's Chinese layout requirements, and every full-width character mapping was verified against the Unicode Character Database rather than assumed.

The whole pipeline is deterministic and idempotent: formatting already-formatted text changes nothing, so you can run it as many times as you like. The result reports paragraph, word and CJK character counts alongside the exact line counts, and a copy button takes the output wherever it needs to go. Input is capped at one million characters and processes in a single pass in around a tenth of a second even at that size. Everything runs in your browser; nothing is uploaded, stored or attached to an account.

Scope is stated plainly. This tool arranges text; it does not rewrite it. Simplified and Traditional Chinese conversion is not offered, because doing it correctly requires a large character mapping this page does not carry. Line numbering lives in its own tool, and QR codes and signature blocks are outside what typesetting means. What this page does, it does completely: paste, one click, and the article is set.

Methodology & sources

Apply a fixed, documented pipeline of line-ending normalization, sentence-aware paragraph reflow, whitespace cleanup, indentation, context-aware punctuation width conversion verified against the Unicode Character Database, and CJK-Latin spacing per the W3C Chinese layout requirements, so the result is deterministic and idempotent.

Frequently asked questions

What does the one-click article preset actually do?
For CJK text: rejoins hard-wrapped lines into paragraphs, indents with two ideographic spaces, converts punctuation to full-width after CJK characters, turns period runs into a proper ellipsis, spaces CJK against Latin words and digits, and normalizes blank lines. Each rule is also an individual switch.
Will it convert the commas in numbers like 3,000?
No. Width conversion is context-aware: only punctuation that follows CJK text is converted. Commas inside numbers and ordinary English sentences are left exactly as typed.
Does it convert Simplified to Traditional Chinese?
No. That conversion needs a large character mapping table and is deliberately out of scope. This page arranges text: paragraphs, indentation, punctuation width, spacing and blank lines.

Text Tools guides

View all