12 chars · 2 lines
Waiting for input
12 chars · 2 lines
Waiting for input
Cross-platform hash mismatches
Windows-style CRLF uses two control characters while Unix-style LF uses one. The visible lines can be identical while the underlying bytes, and therefore their hashes, differ. This tool is free to use. No account or payment is required.
Last updated
CRLF is carriage return plus line feed; LF is line feed alone. Hash functions see that byte-level difference even when editors render both as a normal new line.
Both inputs display as two lines but use different line-ending bytes.
CRLF: hello\r\nworld
LF: hello\nworldCRLF: 4739e65e5ea45fcd394e1ca6dc39e603f59fb6cf3f4f31fc7b6a1f6c4715be8e
LF: 26c60a61d01db5836ca70fefd44a6a016620413c8ef5f259a6c5612d4f79d3b8Common questions
Line-ending normalization changes bytes, so a hash of working-tree text can differ from another representation when CRLF and LF are converted.
Only if the format or protocol defines normalized text as the data being hashed.
Debugging a specific Hash issue? Browse Hash troubleshooting.