Skip to tool
FeuTex · free tools runs in-browser no bloat built by LiMiT

jj diff formatter

Paste output from jj diff (or any unified diff) and format it for tickets, PR comments, and docs. This tool strips ANSI color codes, normalizes line endings, trims trailing whitespace, and keeps spacing consistent.

Category: Text · URL: /tools/jj-diff-formatter.html

How to use

Use it to clean up jj diff output for sharing.

  1. Paste your diff into the input box.
  2. Choose Readable or Compact, and toggle options (ANSI stripping, trimming, blank lines).
  3. Click Format.
  4. Copy the result or download it as a .diff file.
Keywords this page targets (natural cluster): jj diff formatter, jujutsu diff formatter, jj diff pretty print, format jj diff output, strip ansi from jj diff, remove color codes from diff, normalize diff line endings, clean unified diff text, format patch text online, jj diff to plain text, make diff readable, compact diff formatter, trim trailing whitespace in diff, normalize git diff output, diff formatter for pr comments, diff text cleanup tool, format unified diff headers, copy formatted diff, fix messy diff spacing, diff formatter no colors
Secondary intents covered: Remove ANSI color codes from terminal diff output before sharing, Normalize CRLF/LF line endings so diffs render consistently in reviews, Trim trailing whitespace to reduce noise in pasted diffs, Make multi-file diffs easier to read with consistent spacing, Create a compact diff for chat/issue trackers with limited space, Prepare diff text for a patch file without changing semantics, Quickly copy a cleaned diff to clipboard, Download the formatted diff as a .diff file

FAQ

Does this change the meaning of my diff?

No—this tool only cleans presentation (ANSI colors, whitespace, blank-line spacing). It does not rewrite +/- content or hunk ranges.

Will it work with git diff output too?

Yes. It formats standard unified diffs (including diff --git, ---/+++, and @@ hunks).

What are ANSI color codes, and why strip them?

They’re terminal escape sequences used for colored output. Stripping them makes pasted diffs readable in plain text fields and issue trackers.

What does “Max blank lines” do?

It limits consecutive empty lines so the output stays compact and avoids huge gaps when copying from terminals.

What’s the difference between Readable and Compact?

Readable inserts sensible spacing between file sections; Compact removes all blank lines to save space.

Is anything uploaded to a server?

No. Formatting runs locally in your browser; no network requests are made by the tool.

Can I turn the formatted output into a patch file?

Yes—use “Download .diff” to save the formatted text. If your workflow is strict about whitespace, keep trimming enabled.