TextWash

This page finds U+2028 LINE SEPARATOR and U+2029 PARAGRAPH SEPARATOR and converts them to real newlines. The sample below contains a string that is secretly two lines. Everything runs in your browser — nothing is uploaded.

Input

X-ray hover a highlight for details

Cleaned output copied ✓

Cleaning rules

What is U+2028 (line separator)?

Unicode's "unambiguous newline" — a line break that isn't \n or \r\n. Its sibling U+2029 is the paragraph separator. Almost nothing displays them, almost nothing types them, and a surprising number of tools choke on them.

Where it comes from

Adobe InDesign's "forced line break" (Shift+Enter) exports as U+2028, some Apple apps and old text editors emit it, and it survives inside JSON string values because JSON has always allowed it raw. Copy text out of a layout tool or an API response and it comes along, invisibly.

What it breaks

The famous one: before ES2019, a raw U+2028 inside a JavaScript string literal was a line terminator, so JSON embedded in a <script> tag threw SyntaxError: Invalid or unexpected token — valid JSON, invalid JavaScript. Today it still breaks line-based tooling: split("\n") treats it as one line, JS regex . refuses to match across it, grep and log shippers disagree with editors about how many lines a file has, and CSV "one record per line" parsers silently merge records.

How to find it

VS Code: regex-search [\u2028\u2029]. Command line: grep -rP '[\x{2028}\x{2029}]' . — or paste the text above: each one is flagged (LS/PS) and converted to a plain \n in the cleaned output, so every tool agrees on the line count again.