JavaScript
Five snippets that exercise the whole /js toolkit: the formatted view, the compressor, the deobfuscator, the obfuscator and the stats report. Each link lands directly on the tab named in the URL’s viewer= parameter.
hello.js — Hello world, syntax-highlighted
149 bytes in the fragment · opens the FORMAT tab
A three-line greeting. Opens straight on the FORMATTED tab: reflowed, coloured, line-numbered.
// Your code travels inside the link itself — no server ever sees it.
const greet = (name) => `Hello, ${name}!`;
console.log(greet('OmniViewer'));
Open hello.js in OmniViewer →
fizzbuzz.js — FizzBuzz, opened on the STATS tab
144 bytes in the fragment · opens the STATS tab
The classic loop, landing on code statistics: keyword distribution, lines of code, function counts.
for (let i = 1; i <= 100; i++) {
let out = '';
if (i % 3 === 0) out += 'Fizz';
if (i % 5 === 0) out += 'Buzz';
console.log(out || i);
}
Open fizzbuzz.js in OmniViewer →
minified.js — Minified one-liner → deobfuscator
113 bytes in the fragment · opens the DEOBFUSCATOR tab
A squeezed Fibonacci one-liner that the DEOBFUSCATOR lays back out into readable, indented source.
const f=n=>{let a=0,b=1;while(n-->0){[a,b]=[b,a+b]}return a};console.log([...Array(10).keys()].map(f).join(","));
Open minified.js in OmniViewer →
chatty.js — Over-commented class → compressor
677 bytes in the fragment · opens the COMPRESSOR tab
An event emitter with far too many comments. The COMPRESSOR strips them and shows the size win.
// A tiny event emitter, commented far beyond its pay grade.
// Every listener lives in a Map from event name to a Set of callbacks.
class Emitter {
constructor() {
// The registry: event name -> Set of listeners.
this.listeners = new Map();
}
// Subscribe. Returns a function that unsubscribes again.
on(event, fn) {
if (!this.listeners.has(event)) this.listeners.set(event, new Set());
this.listeners.get(event).add(fn);
return () => this.listeners.get(event)?.delete(fn);
}
// Fire every listener registered for this event, in insertion order.
emit(event, payload) {
for (const fn of this.listeners.get(event) ?? []) fn(payload);
}
}
Open chatty.js in OmniViewer →
greeting.js — String literals → obfuscator
136 bytes in the fragment · opens the OBFUSCATOR tab
Plain code with readable strings. The OBFUSCATOR minifies it and rewrites the strings as \x hex escapes.
const password = 'correct horse battery staple';
const banner = 'Welcome to the obfuscator demo';
console.log(banner, password.length);
Open greeting.js in OmniViewer →
JSON
JSON files get line numbers and a text-sniffed raw view. The same links work on fastjsonviewer.com’s engine — the fragment format is shared.
package.json — A package.json manifest
266 bytes in the fragment
A typical npm manifest with line numbers in the raw view — exactly as if you had dropped the file.
{
"name": "shared-by-url",
"version": "1.0.0",
"description": "This file arrived through the URL fragment — no upload involved.",
"type": "module",
"scripts": { "start": "node index.js" },
"keywords": ["share", "url", "fragment"],
"license": "MIT"
}
Open package.json in OmniViewer →
earthquake.geojson — GeoJSON point feature
172 bytes in the fragment
A GeoJSON Feature with coordinates and properties, shared as a link instead of an attachment.
{
"type": "Feature",
"geometry": { "type": "Point", "coordinates": [-122.4194, 37.7749] },
"properties": { "mag": 4.2, "place": "San Francisco, CA", "tsunami": 0 }
}
Open earthquake.geojson in OmniViewer →
api-response.json — API response, opened in hex
103 bytes in the fragment · opens the HEX tab
A compact API payload landing on the HEX tab — offsets, bytes and the ASCII column side by side.
{"ok":true,"data":{"users":[{"id":1,"name":"Ada"},{"id":2,"name":"Linus"}],"total":2},"ts":1751808000}
Open api-response.json in OmniViewer →
Rust
OmniViewer has no Rust-specific tooling (yet) — these show the universal path: any text file gets a numbered raw view and a hex view, whatever the extension.
hello.rs — Hello world in Rust
58 bytes in the fragment
The smallest Rust program, shared by URL. Line numbers come from the text sniff, not the extension.
fn main() {
println!("Hello from a URL fragment!");
}
Open hello.rs in OmniViewer →
fibonacci.rs — Recursive Fibonacci with match
196 bytes in the fragment
Pattern matching, ranges and an iterator chain — a small but idiomatic slice of Rust.
fn fib(n: u64) -> u64 {
match n {
0 | 1 => n,
_ => fib(n - 1) + fib(n - 2),
}
}
fn main() {
let seq: Vec<u64> = (0..10).map(fib).collect();
println!("{seq:?}");
}
Open fibonacci.rs in OmniViewer →
traits.rs — A trait and its impl
234 bytes in the fragment
Trait definition, a struct and an impl block: enough Rust to argue about in a code review link.
trait Greet {
fn greet(&self) -> String;
}
struct Viewer;
impl Greet for Viewer {
fn greet(&self) -> String {
"every byte stays in your browser".to_string()
}
}
fn main() {
println!("{}", Viewer.greet());
}
Open traits.rs in OmniViewer →
Plain text & data
Notes, Markdown, logs and CSV — the everyday snippets you’d otherwise paste into a chat as a screenshot.
notes.txt — Plain-text note with UTF-8
167 bytes in the fragment
Emoji and em dashes round-trip byte-for-byte: the fragment carries the exact UTF-8 bytes.
Shopping list — shared straight through a URL:
- coffee ☕
- rye bread
- 1 kg oranges
The em dash and the emoji above prove UTF-8 survives the trip intact.
Open notes.txt in OmniViewer →
README.md — A Markdown README
324 bytes in the fragment
Markdown is text, so it gets line numbers and the stats-friendly raw view.
# Shared via URL
This markdown file was never uploaded anywhere.
1. The bytes are base64url-encoded into the link's `#payload=` fragment.
2. Fragments never leave the browser — servers and logs never see them.
3. OmniViewer decodes the fragment locally and shows the file.
*Share small files with zero infrastructure.*
Open README.md in OmniViewer →
server.log — A server log snippet
348 bytes in the fragment
Five log lines you can hand to a colleague as a URL — no pastebin, no retention policy, no server.
2026-07-06T09:00:01Z INFO boot omniviewer static site up
2026-07-06T09:00:04Z INFO ingest file received via #payload= fragment
2026-07-06T09:00:04Z DEBUG sniff verdict=text lines=6
2026-07-06T09:00:05Z WARN upload no upload endpoint exists — nothing to do
2026-07-06T09:00:05Z INFO done rendered locally in 3 ms
Open server.log in OmniViewer →
data.csv — A small CSV table
117 bytes in the fragment
City populations in CSV. For huge CSVs use hugecsv.com; for a quick shared snippet, this is enough.
city,country,population
Tokyo,Japan,37400068
Delhi,India,28514000
Shanghai,China,25582000
São Paulo,Brazil,21650000
Open data.csv in OmniViewer →
Images
Binary payloads round-trip byte-for-byte, so a real PNG and the famous 43-byte GIF arrive intact — magic numbers, checksums and all. SVG, being XML, arrives as readable text.
pixel-heart.png — An 8×8 PNG heart, in hex
105 bytes in the fragment · opens the HEX tab
A real, valid PNG built byte-by-byte. The hex view opens on the 89 50 4E 47 magic — “‰PNG” — followed by IHDR, IDAT and IEND chunks.
00000000 89 50 4E 47 0D 0A 1A 0A 00 00 00 0D 49 48 44 52 .PNG........IHDR
00000010 00 00 00 08 00 00 00 08 08 02 00 00 00 4B 6D 29 .............Km)
… 105 bytes total
Open pixel-heart.png in OmniViewer →
smallest.gif — The 43-byte GIF, in hex
43 bytes in the fragment · opens the HEX tab
The famous smallest-possible GIF: header, one-entry colour table, and a single transparent pixel — all 43 bytes visible at once.
00000000 47 49 46 38 39 61 01 00 01 00 80 00 00 00 00 00 GIF89a..........
00000010 FF FF FF 21 F9 04 01 00 00 00 00 2C 00 00 00 00 ...!.......,....
… 43 bytes total
Open smallest.gif in OmniViewer →
logo.svg — An SVG logo as text
275 bytes in the fragment
SVG is XML, so the raw view shows the markup itself — shapes, strokes and fills as readable source.
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32">
<rect width="32" height="32" rx="6" fill="#0d1117"/>
<circle cx="16" cy="16" r="9" fill="none" stroke="#4da3ff" stroke-width="3"/>
<circle cx="16" cy="16" r="3" fill="#7fbf7f"/>
</svg>
Open logo.svg in OmniViewer →
WebAssembly
Two genuinely valid .wasm modules small enough to live in a URL. The hex view is the natural way to read them: magic, version, then the sections.
add.wasm — A 41-byte WebAssembly module
41 bytes in the fragment · opens the HEX tab
A complete, valid wasm module exporting add(a, b). The hex view starts at the 00 61 73 6D magic — “\0asm”.
00000000 00 61 73 6D 01 00 00 00 01 07 01 60 02 7F 7F 01 .asm.......`....
00000010 7F 03 02 01 00 07 07 01 03 61 64 64 00 00 0A 09 .........add....
… 41 bytes total
Open add.wasm in OmniViewer →
empty.wasm — The smallest valid wasm module
8 bytes in the fragment · opens the HEX tab
Eight bytes: the \0asm magic plus version 1. WebAssembly.validate() says yes; the hex view shows why.
00000000 00 61 73 6D 01 00 00 00 .asm....
Open empty.wasm in OmniViewer →