Home/File Formats/URL encoding
File Format Wiki

URL encoding format rules

Percent-encoding for query strings, paths, and form values.

Format rules

  • Spaces become %20 or + depending on context
  • Reserved characters must be encoded
  • Do not double encode

Valid example

q=hello%20world&tag=a%2Fb

Invalid example

q=hello world&tag=a/b

Common errors

  • Assuming URL encoding accepts syntax from a similar format
  • Using the wrong encoding or line ending
  • Copying invisible characters from rich text
  • Testing only the happy path and not parser errors

Online validation and conversion

Compared with nearby formats

URL encoding should be chosen for the parser and ecosystem that will consume it. Prefer strict formats for APIs, human-friendly formats for ops config, and signed formats only when verification is required.