Tool

Remove line numbers from copied code

Pasting from Claude Code's Read tool, GitHub's blob view, or a cat -n dump leaves line numbers stuck to every line. Strip them in seconds.

The formats this tool handles

  • Tab-prefixed: 1\t, 42\t — the format Claude Code's Read tool uses (the same as cat -n).
  • Pipe-delimited: 1│, 42 │ — common in syntax-highlighted code viewers and tools like bat.
  • Bracketed: [42], (42) — found in some doc tools and traceback formats.
  • GitHub-style: leading numbers from copy-paste of the diff or blob viewer.

How it works

The cleaner runs two passes per line. The first looks for ^\s*\d{1,5}\t — up to five digits followed by a tab — which catches the Read tool format. The second looks for^\s*\d{1,5}\s*[│|>:] — digits followed by a gutter character — which catches every common pipe variant. Both patterns require the line number to be at the very start, so genuine numbers in your code are never touched.

What it doesn't do

It won't strip numeric prefixes that aren't followed by a gutter character (so a line like 42 is the answer stays intact). It won't touch numbers in the middle of a line. If you're looking at a format that gets missed, open an issue on GitHub.

Tip: pair with indent normalisation

Line-numbered output is almost always indented at the gutter — when you strip the numbers, the leading whitespace lingers. The Indent toggle (on by default) detects and removes the common leading indent so your code lands flush in your editor.

Try it

Clean your output now

Pasteinput
Cleanoutput
Your cleaned output will appear here.