URL-encode a list

Paste a list and get every item URL-encoded, one per line. Pick the encoding flavour based on where the result will go: query string, form body (spaces become `+`), URL path segment (slashes preserved), or URL fragment (minimal escaping).

Input
Ready
Output
Live

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

  1. 1Paste your list into the input panel
  2. 2Pick For: Query (default), Form, Path, or Fragment
  3. 3Each line is independently encoded; the output is one encoded item per line
  4. 4Copy or download; reverse with decode-a-url-encoded-list

Keyboard shortcuts

Drive ListShift without touching the mouse.

Shortcut Action
Ctrl ZUndo last input change
Ctrl Shift ZRedo
Ctrl Shift EnterToggle fullscreen focus on the editor
EscExit fullscreen
Ctrl KOpen the command palette to jump to any tool
Ctrl SSave current pipeline draft Plus
Ctrl PRun a saved pipeline Plus

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.

Input
green & blue
hello world
café au lait
path/with/slashes
Output
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`

FAQ

What is the difference between Query and Form modes?
Only one character: Query mode encodes space as `%20`; Form mode encodes it as `+`. Form is the classic HTML form convention (`application/x-www-form-urlencoded`); Query is the general URL convention. If you are not building a form body, use Query.
Why is there a separate Path mode?
Because `encodeURIComponent` escapes `/` to `%2F`, which breaks URL paths. Path mode splits on `/` first, encodes each segment separately, then rejoins with literal `/` - so your slashes stay as path separators while the inside of each segment gets properly escaped.
Does this tool encode unicode characters?
Yes. `encodeURIComponent` and `encodeURI` both convert non-ASCII characters to UTF-8 bytes then percent-encode each byte. `café` becomes `caf%C3%A9`.
Why are `-`, `_`, `.`, `!`, `~`, `*`, `'`, `(`, `)` not encoded?
They are the RFC 3986 "unreserved" characters plus the "safe" set that `encodeURIComponent` preserves. Every URL parser handles them as literals, so escaping would be wasteful.
How do I decode these back?
Use decode-a-url-encoded-list - it runs `decodeURIComponent` on each line, which reverses Query, Path, and Fragment mode output cleanly. Form mode needs one extra step: decode first (resolves the percent-escapes), then run Replace to swap any remaining `+` back to space, because `decodeURIComponent` treats `+` as a literal character, not a form-encoded space.