URL Integrations

GitHub, Data Links, and Live Workspaces.

Instacalc can be used as a “stateless” tool where the calculation is stored entirely in the URL. This makes it incredibly easy to share logic without ever needing to “save” a file to a database.

GitHub Integration

Instacalc features a “Magic URL” integration with GitHub. You can load any calculator file (.ic, .md, or .txt) or even an entire directory directly from GitHub.

How It Works

Paste any GitHub URL after instacalc.com/ and it becomes a live calculator.

  • GitHub: https://github.com/kazad/instacalc/blob/main/demo/sample.ic
  • Instacalc: instacalc.com/https://github.com/kazad/instacalc/blob/main/demo/sample.ic

Just put instacalc.com/ in front of the GitHub link — that’s it.

What you can open:

  • Files: instacalc.com/<github file URL> — renders as a live calculator
  • Folders: instacalc.com/<github tree URL> — gallery of all calculators in the directory
  • Repos: instacalc.com/github.com/owner/repo — browse all calculators in the repo

Caching & Refreshing

Instacalc caches GitHub content for 5 minutes to stay within API limits. If you’ve just pushed changes:

  • Add ?fresh to the URL to bypass the cache

  • Or hover over the GitHub icon and click Refresh

  • Automatic Updates: When you update the file on GitHub, the calculator updates within 5 minutes (or instantly with ?fresh).

  • Remixable: Anyone can open the link and start editing. If they want to save their changes, they can save it as a new Instacalc.

Data Links (Stateless Calcs)

Instacalc is designed to be super URL-friendly. You can encode calculator rows directly in the URL path, creating “stateless” calculators that live entirely in the link. This is perfect for dynamic links, spreadsheets, or simple scripts.

Format: instacalc.com/<row1>;<row2>;<row3>

Delimiters: Use ; or | to separate rows. | is often easier to type and read in URLs.

Readable Data Links

To keep URLs clean and avoid ugly %20 encoding, Instacalc supports Underscore Normalization:

  • Underscores become Spaces: my_variable in the URL becomes my variable in the calculator.
  • Double Underscores are Literals: Use __ if you actually need a literal underscore in your text.
  • Title Support: If the first segment has no math operators (like =), it becomes the title.

Example: A “Clean” Link instacalc.com/Unit_Price;qty=5;price=99;qty*price

  • Title: Unit Price
  • Rows: qty=5, price=99, qty*price

Example: Chained Operations instacalc.com/[1,2,3]|map(x=>x*10)|sum

  • Output: 60

URL Encoding Tips

  • + is treated as addition, not a space.
  • Use camelCase for variable names if you want to avoid spaces entirely.
  • Use _ for spaces in titles or variable names to keep the URL human-readable.

URL Parameter Overrides

You can pass custom values into any calculator (shared, GitHub, or data link) via the query string. This is useful for “pre-filling” a calculator with specific numbers.

Matching rows (e.g., price = 10) will have their values replaced by the ones in the URL.

Supported Formats

  1. Standard Query Params: instacalc.com/12345?price=99&qty=5

  2. Semicolon Separated (Compact): instacalc.com/12345?price=99;qty=5

  3. Pipe Separated: instacalc.com/12345?price=99|qty=5

Combined Example (Data Link + Overrides): instacalc.com/qty=1;price=10;qty*price?qty=5

  • This opens a data link with qty=1, but immediately overrides it to qty=5.

Live Workspaces (Collaborative)

Want to work with someone in real-time? Use a Hash Room.

Format: instacalc.com/#<room-name>

Example: instacalc.com/#our-trip-budget

  • Real-time: Everyone at the same URL sees updates instantly.
  • Ephemeral: These rooms are “live” workspaces. They are not indexed by search engines.
  • No Login Required: Just pick a unique room name and share the link.
  • Read/Write: Anyone with the URL can read and write to the workspace.