Local files and pasted snippets

Source Code Viewer

Read source code with line numbers and syntax colors. Find text, jump to a line, inspect hidden characters, and extract a numbered snippet for your next code review.

This tool inspects text you paste or open from your device. It cannot fetch a website URL. Your code is displayed as text; scripts, HTML, styles, and linked resources are never run or loaded.

1. Add your source

Maximum 256 KiB (262,144 UTF-8 bytes) and 20,000 lines. Text files only. Files open immediately; pasted edits need Inspect source.

Opened files keep their original line endings until you edit this box. Browsers normalize textarea edits to LF line endings. Code and file names are not submitted by this tool.

Ready for a file or pasted source.

How to inspect source code

  1. Paste a snippet or choose a UTF-8 source file from your device. To inspect a website, obtain its HTML using your browser's View Page Source or developer tools, then paste that text here. This tool cannot retrieve a live URL.
  2. Select Inspect source. Use the language menu if automatic detection guesses incorrectly. Unsupported languages remain readable in Plain text mode.
  3. Search for a selector, function, meta tag, or other literal text. Use the line number and match column to locate it. Page controls show 100 lines at a time; search covers the complete loaded source.
  4. Review line endings and hidden-character notices. Copy the full source or extract a line range with original line numbers for a review or support ticket.

What the details mean

UTF-8 bytes measure the loaded text, not network transfer size. Unicode code points differ from JavaScript's UTF-16 units and from visible glyphs. A CRLF pair is one line break; a final newline adds an empty final line. Columns and longest-line measurements use UTF-16 units.

Mixed CRLF, LF, or CR endings can complicate diffs. Tabs and trailing spaces may be intentional. Bidirectional controls and other invisible characters can affect display or behavior, so they are made visible in the read-only view. Their presence does not by itself mean code is unsafe. The list is not a comprehensive Unicode or security audit.

Limits and accuracy

HTML/XML, CSS, JavaScript, and JSON receive basic lexical coloring. Embedded languages, regular-expression literals, and complex template strings may be colored imperfectly. Large or token-heavy sources fall back to plain text. JSON mode checks syntax only; it does not check duplicate keys, schema, exact number precision, or application behavior. No code is formatted or rewritten.

A pasted or opened file is a snapshot supplied by you. This tool cannot confirm what a web server currently serves, read response headers, test remote resources, inspect a rendered DOM, or verify search-engine behavior. It does not compile, execute, or certify source code.

Privacy and safe handling

This tool reads selected files and processes pasted text in this page's memory. It does not upload source, request source URLs, save browser drafts, or load resources referenced in your code. Clear all removes the tool's current input and results. The site's shared analytics are separate; this tool adds no source tracking. Redact secrets before sharing copies or exports.

File decoding follows the WHATWG Encoding Standard; JSON syntax follows RFC 8259. See the Unicode bidirectional algorithm for the meaning of directional controls.