Skip to content

achimb/SpotifyCodeTagGenerator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spotify Code Tag Generator

Turn any Spotify share link into a 3D‑printable keychain tag of its Spotify Code — right in your browser. No install, no server, no account.

The whole app is a single self‑contained HTML file (SpotifyCodeTagGenerator.html). Download it, double‑click to open it in your browser, paste a link, and save an .stl.

What it does

  • Paste a Spotify track, album, artist, or playlist share link.
  • Reads the code's bar pattern live from Spotify's own scannable renderer, so the result is identical to what Spotify prints (and scans with the Spotify app).
  • Builds a printable STL entirely in the browser and lets you Save it — no OpenSCAD required for the default raised style.
  • Also emits fully parametric OpenSCAD code if you'd rather tweak the model (dimensions, engraved style, keychain ear, corner radius, etc.).

How to use

  1. Download SpotifyCodeTagGenerator.html and open it in any modern browser.
  2. Paste your Spotify share link (••• → Share → Copy link).
  3. Adjust the size / options.
  4. Click Save .stl, then slice and print.

Tip: for a scannable print, use two colours (dark plate, light bars) — a single‑colour tag usually won't scan. The colour‑change layer sits at z = base thickness.

Note: the page needs an internet connection when you click Save/Copy, because it fetches the code's bar heights from Spotify's servers. Everything else (the STL/OpenSCAD generation) happens locally; nothing is uploaded.

How it works (the interesting bit)

A Spotify Code encodes a "media reference" number that only Spotify's servers can map to a URI — so you can't derive it from the URL offline. Instead, this tool requests Spotify's public scannable SVG (scannables.scdn.co/uri/plain/svg/...), reads the 23 bar heights straight from the markup, quantises them to the 8 levels Spotify uses, and extrudes them into a tag. The mesh is built with a small inlined polygon triangulator (earcut) — every part of the tag is a flat 2‑D outline extruded in Z, so no CSG engine is needed.

Disclaimer

For personal, non‑commercial use only. This is an unofficial hobby tool and is not affiliated with, endorsed by, or sponsored by Spotify. "Spotify", Spotify Codes, and the Spotify logo are trademarks of Spotify AB. The official Spotify Codes generator is at https://spotifycodes.com. Spotify's Terms and Conditions for Spotify Codes restrict modifying codes and using them on products; please review them before using generated tags for anything beyond personal use.

License

MIT © 2026 Achim Breidenbach — anyone may download, use, and modify this software. The MIT license covers the code in this repository only; it does not grant any rights to Spotify's trademarks or content.

About

Turn any Spotify link into a scannable, 3D-printable keychain tag — right in your browser. One self-contained HTML file, straight to STL.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages