Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

40 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Semaphore logo

Semaphore

๐Ÿšฉ Turn any image into ASCII art, right in your browser โ€” no upload, no account.

Build status GitHub release Stars License Live site

English ยท ็ฎ€ไฝ“ไธญๆ–‡

Semaphore hero

Features

  • Drop and convert: PNG / JPG / WebP / GIF โ€” drag it into the browser and the ASCII lands in milliseconds
  • Nothing is uploaded: pixels are sampled on a local <canvas>, and production ships connect-src 'none' so the page cannot phone home
  • Six charsets: from classic luminance ramps to a dithered 2ร—4 braille matrix with 8ร— the pixel density
  • Live controls: columns, brightness, contrast, invert, and green / grayscale / original color โ€” re-converted every frame
  • Flexible export: copy plain text, download .txt or .png, or generate a share card with the parameters baked in
  • CRT terminal aesthetics: scanlines, phosphor glow, and a vim statusbar โ€” the whole site is one terminal

Quick Start

Open semaphore.bobochang.cn/tool and drop an image in. That is the whole flow โ€” no sign-up, no queue, no watermark. For photographic detail, try the image to braille ASCII art guide and open its one-click Braille preset.

Prefer to run it yourself:

git clone https://github.com/can4hou6joeng4/Semaphore.git
cd Semaphore
npm install
npm run dev        # dev server
npm test           # unit tests (vitest)
npm run build      # type-check + build to dist/
npm run preview    # serve the built dist/

Charsets

Six charsets, six textures โ€” every ramp runs dark to bright, and the engine maps each cell by luminance:

Charset Ramp Best for
standard .:-=+*#%@ The classic โ€” safe in any monospace context
detailed 70-level grayscale ( .'^",:;Il!i~+โ€ฆ#MW&8%B@$) Portraits and photos
blocks โ–‘โ–’โ–“โ–ˆ Pixel art, low-res posters
minimal .:*# Minimal logos, tiny avatars
binary 01 Cyberpunk, code-rain looks
braille 2ร—4 braille dots + dithering 8ร— pixel density at the same width โ€” the detail king

Privacy

Your image is sampled pixel by pixel on a local <canvas>; conversion, rendering and export all happen inside your browser process. This site has no backend API, no analytics scripts in the page, no cookies, and not a single third-party request โ€” the font is self-hosted too.

That is enforced, not just promised: the deployed pages ship Content-Security-Policy: โ€ฆ connect-src 'none', so the page cannot open a fetch, XHR or WebSocket to anywhere (a client-side analytics beacon would be blocked on purpose). Open devtools, watch the network tab stay silent, then close the tab โ€” your image never left the device.

The operator still sees aggregate edge request counts on Cloudflare Pages (which paths were hit). That is HTTP traffic for the static files themselves, not a second phone-home from your browser, and it never includes image bytes. Details: FAQ.

How It Works

  image โ”€โ”€โ–ถ canvas sampling โ”€โ”€โ–ถ luminance grid โ”€โ”€โ–ถ character mapping โ”€โ”€โ–ถ ASCII
            (cover crop)        (per-cell mean)    (ramps / braille)      โ””โ”€โ–ถ .txt / .png / share card

Vite 8 ยท TypeScript 7 (strict) ยท vanilla DOM, zero frameworks ยท Cloudflare Pages.

Pages live at the repo root โ€” index.html (landing), tool.html (the converter), usecases.html, faq.html โ€” with per-page behavior in the src/main-*.ts entries. The conversion engine is src/ascii-engine.ts, share cards are src/sharecard.ts, and the binding design contract is STYLEGUIDE.md. Repository maintenance rules and the traps a fresh read will not reveal live in AGENTS.md.

Why "Semaphore"

Semaphore is the sailors' way of talking across water: no telegraph, no network โ€” just a pair of arms and two flags, spelling a message out to the distance one character at a time. This tool does the same thing to pictures: it breaks an image into characters so it can travel anywhere plain text can go โ€” terminals, code comments, READMEs, chat windows.

Harbor shelters knowledge, Beacon warns of danger, Atlas charts the voyage โ€” Semaphore signals the image.

The tool

Credits

Support

License

Semaphore is open source under MIT, see LICENSE. The ASCII art you make with it is yours โ€” posters, readmes, merch, client work, anything.

About

๐Ÿšฉ Turn any image into ASCII art, right in your browser โ€” no upload, no account ยท ๆŠŠๅ›พ็‰‡ๆ‰“ๆˆๅญ—็ฌฆๆ——่ฏญ (Vite + TypeScript)

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages