Skip to content
Guides

Practical guides for files and developer tools

Understand upload limits, choose formats, and check developer-tool output with reproducible examples.

SQL formatting edge cases you can reproduce

A SQL formatter should preserve quoted values and comment boundaries. This guide explains the checked fixtures and how to reproduce them in the open-source repository.

4 min read

Document photo sizes, and how to read a specification

A reference for document photo specifications and, more usefully, a method for reading one you have never seen before. Two specifications here are quoted from the issuing authority and linked. Everything else is either arithmetic, which is safe anywhere, or a convention that you have to confirm before you rely on it.

7 min read

The US visa and Diversity Visa photo specification, explained

The State Department states its photo rules as numbers rather than a diagram: square, 600 to 1200 pixels, JPEG only, 240 KB or less, 24-bit colour in sRGB, compressed no harder than 20:1. This walks through what each line is actually testing, the one interaction between two of the limits that catches people out, and where the Diversity Visa program stands as of August 2026.

8 min read

How to get a photo under 20 KB without wrecking it

Twenty kilobytes is roughly a two-hundredth of what a phone camera produces, and the forms that ask for it do not negotiate. This guide covers the order of operations that works at 20 KB, 50 KB and 100 KB, what each of those sizes looks like on a face, and the published specifications where compressing too hard is itself a rejection.

7 min read

Preparing documents for government and university online portals

Portals accept files on rules they mostly do not publish, then reject them with a red box that says nothing useful. This is the working order for getting a document from paper to accepted upload, the traps between each step, and how to diagnose a silent rejection instead of guessing.

7 min read

What actually happens inside a PDF when you compress it

Run two PDFs through the same compressor and one collapses while the other barely moves. The difference is structural, and it is obvious once you know what a PDF is made of. This is the mechanical account: the objects, the stream filters, what a rebuild can remove, and why some files will not shrink at all.

7 min read

Image formats compared: JPEG, PNG, WebP, AVIF, GIF, SVG and HEIC

Seven formats cover nearly every image you will ever save or be sent, and each was designed against a different problem. This guide sets them side by side on the properties that actually decide things, then works through what each one is for, where it fails, and how to choose based on who opens the file next.

7 min read

HEIC explained: why iPhone photos will not open, and how to get a JPG

HEIC is the format iPhones have used for photos since 2017. It stores a picture in roughly half the space of a JPEG, and it fails to open on a large share of the computers you might send it to. Here is what the format is, exactly where it breaks, the setting that stops your phone producing it, and what conversion can and cannot do.

7 min read

Uploads versus your browser: what really happens to a file, and how to check

Two websites that look identical can do completely different things with the file you hand them. One sends it to a server, the other never lets it leave the tab. This guide explains both paths honestly, including what browser processing costs you, then shows two ways to find out for yourself which one a site is using.

7 min read