Base64, JSON, CSV and URL Encoding Explained for Beginners
If you work with websites, spreadsheets or data, you will meet a handful of text formats again and again. This guide explains what they are in plain language and shows a tiny example of each.
Base64
Base64 turns any data into a string made of 64 safe characters (letters, digits, plus and slash, with equals signs used as padding). It is used to carry data through systems that only handle plain text, such as emails and some web addresses.
- The word
HellobecomesSGVsbG8=. - Base64 makes data about one third larger.
- It is not encryption. Anyone can decode it, so never use it to hide passwords or secrets.
Try it with the Base64 Encoder and Decoder, which handles UTF-8 text.
JSON
JSON is a text format for structured data that both people and programs can read. A small example is {"name": "Ali", "age": 30}. Common mistakes that make JSON invalid include single quotes instead of double quotes, a trailing comma after the last item, and unquoted keys. The JSON Formatter and Validator checks your text and formats it with readable indentation.
CSV
CSV stands for comma-separated values. Each line is a row and each comma separates a column, for example name,age then Ali,30. Spreadsheets export CSV easily. To use the same data in a web application you may want JSON, and the CSV to JSON Converter turns simple delimited text into an array of objects. Watch out for values that contain commas, because they normally need to be wrapped in quotes.
HTML entities
Some characters have a special meaning in HTML. If you want a literal less-than sign to appear on a page you write < instead, and an ampersand is written &. Encoding these characters stops browsers from treating your text as markup. The HTML Entity Encoder and Decoder converts in both directions.
URL encoding
Web addresses can only contain a limited set of characters. Everything else is replaced by a percent sign and two hexadecimal digits, so a space becomes %20. This matters when you put text into a link or query. The URL Encoder and Decoder does the conversion, and the Slug Generator creates clean, readable URL slugs from a title.
Which should you use?
| Need | Use |
|---|---|
| Send binary or special text through a text-only channel | Base64 |
| Exchange structured data between programs | JSON |
| Move table data to and from spreadsheets | CSV |
| Show special characters safely in a web page | HTML entities |
| Put text inside a web address | URL encoding |
All of these tools on SmartCheu run in your browser, so the text you paste stays on your device. Still, avoid pasting passwords or private keys into any online tool.