Four encoding flavours for four URL contexts
Query string (default) uses `encodeURIComponent` - the safest all-purpose encoder. Every non-alphanumeric character except `-_.!~*'()` is percent-encoded, including slashes, ampersands, spaces (as `%20`), and unicode characters (which go to UTF-8 bytes then percent). Use this for everything you put into `?key=value` parameters.
Form mode is `encodeURIComponent` with spaces swapped from `%20` to `+`. That matches how browsers encode form-submitted data (`application/x-www-form-urlencoded`). Use when your data is going into a classic POST body or a URL some legacy server parses as form data.
Path mode splits on `/` and encodes each segment separately, then rejoins with literal `/`. Useful when the item is a URL path like `users/alice/avatar.png` - the slashes stay as path separators, but spaces inside segments become `%20`. Fragment mode is `encodeURI` - lighter escaping that keeps URL-structural characters intact, suitable for the `#anchor` part.
How to use url-encode a list
- 1Paste your list into the input panel
- 2Pick For: Query (default), Form, Path, or Fragment
- 3Each line is independently encoded; the output is one encoded item per line
- 4Copy or download; reverse with decode-a-url-encoded-list
Keyboard shortcuts
Drive ListShift without touching the mouse.
What this encoder actually does
Four encoding modes for four URL contexts.
Query mode: aggressive, all-purpose
Uses the browser's `encodeURIComponent`. Every character that is not alphanumeric or in `-_.!~*'()` is percent-encoded, including `/`, `&`, `=`, `+`, space (as `%20`), and unicode (as UTF-8 bytes). The default and right choice for `?key=value` parameter values.
Form mode: spaces become `+`
Same as Query mode, with one final swap: `%20` becomes `+`. This is the `application/x-www-form-urlencoded` convention - used by classic HTML form submissions and some legacy APIs. Only the spaces differ from Query mode.
Path mode: preserves slashes
Splits the item on `/`, runs `encodeURIComponent` on each segment, then rejoins with literal `/`. Use when the item is a URL path - `users/alice+smith/file name.pdf` becomes `users/alice%2Bsmith/file%20name.pdf`, slashes intact.
Fragment mode: lighter, keeps structural chars
Uses `encodeURI` rather than `encodeURIComponent`. Reserved URL characters (`/`, `?`, `#`, `:`, `@`, `&`, `=`, `+`, `$`, `,`) are left alone. Use for the `#fragment` part of a URL when you want most punctuation intact but need unicode escaped.
Runs in your browser
The encoders are native browser APIs - no server round-trip. Your list never leaves the tab, which matters for URLs containing internal IDs, emails, or auth tokens.
Worked example
Query mode (default): every non-alphanumeric except `-_.!~*'()` percent-encoded.
green & blue hello world café au lait path/with/slashes
green%20%26%20blue hello%20world caf%C3%A9%20au%20lait path%2Fwith%2Fslashes
Settings reference
How each mode shapes the encoded output.
| Setting | What it does | Effect on the sample |
|---|---|---|
| For: Query (default) | `encodeURIComponent` per line | `green%20%26%20blue` / `hello%20world` / ... |
| For: Form | `encodeURIComponent` with `%20` → `+` | `green+%26+blue` / `hello+world` / ... |
| For: Path | Splits on `/`, encodes each segment, rejoins with `/` | `path/with/slashes` stays as `path/with/slashes` |
| For: Fragment | `encodeURI` - lighter escaping | `green%20&%20blue` (ampersand kept) / `hello%20world` |