feat(base64-decoder): add base64 to file decoder web tool

Single-file browser tool that decodes a base64 string and saves the
result back out as a file. No server, no dependencies, nothing uploaded.

Input cleanup covers data URIs, URL-safe alphabet, missing padding,
line wrapping, percent-encoding and wrapping quotes. Type detection
runs magic bytes (~30 signatures), then the data URI's declared MIME,
then UTF-8 content sniffing for SVG/HTML/XML/JSON/PEM; unrecognised
payloads fall back to .bin with a hex dump. Images, audio, video, PDF
and text are previewed inline before download.
This commit is contained in:
2026-07-27 20:55:19 +01:00
parent fa0170daa9
commit 3ee7d7a3ac
3 changed files with 640 additions and 0 deletions
+8
View File
@@ -4,6 +4,14 @@ A collection of utility tools for development and testing.
## Tools
### [Base64 → File](./base64-decoder/)
A single-file web tool that decodes a base64 string and saves it back out as a real file. Handles data URIs, URL-safe base64, missing padding and line-wrapped input; detects the file type from magic bytes and previews images, audio, video, PDFs and text before you download. Runs entirely in the browser — no server, no dependencies, nothing uploaded.
```bash
xdg-open base64-decoder/base64-decoder.html
```
### [Fake Media](./fake-media/)
Generates large collections of placeholder PNG images for testing without downloading real files. Supports a terminal UI and a non-interactive CLI mode. Configurable image sizes, folder structure, file counts, and naming prefixes — uses only Python's standard library.