Work / Case study
Case study · Local SEO · Free tool

Building a local business schema generator with a live Google checklist

Schema markup tells Google exactly who a local business is: its name, address, phone, hours and profiles. Most small business sites don’t have it, or have it with mistakes. I built a free tool on my site that turns a simple form into ready-to-paste JSON-LD and checks it against what Google requires, so I could learn structured data by shipping it.

Role

Idea, UX, development

Timeline

Nov 2026 · 1 day

Platform

WordPress · Schema.org · Vanilla JS

Schema generator case study cover: a JSON-LD code card for a med spa beside a Google checklist with every item passed
11

Business types

med spa, dental, clinic and more
9

Checklist items

required and recommended
Live

Output

updates on every keystroke
0

Data sent anywhere

it all runs in the browser
1

Code Snippet

form, output and styles
01 — The idea

Replacing a feature that said the same thing twice

The “Try it live” strip on my homepage had a “Check my fit” card that opened the same AI assistant as the button in my hero, so visitors saw one feature twice. I swapped it for something new that fits the local SEO work I do for med spa and dental clients. A schema generator was the right size: useful on its own, and a good way to deepen what I know about structured data. I set a few rules first:

  • Private by design. Business details never leave the browser. No server, no API, no saved data.
  • Teach while it works. The checklist explains what Google requires and what only helps, so the tool shows why, not just what.
  • Valid by default. Empty fields are left out, so the output never ships blank values.
  • Built for my clients’ industries. Med spa, dental and clinic types come first, with the right Schema.org types behind each.
Schema.org
JSON-LD
Structured data
Local SEO
Vanilla JS
Code Snippets
WordPress
Rich Results Test
02 — How it works

Form in, Google-ready code out

The tool is one page with two sides: a form on the left and the live result on the right.

  • 1. Pick a business type. Each option maps to the right Schema.org type. A med spa, for example, is marked up as both a MedicalBusiness and a HealthAndBeautyBusiness.
  • 2. Fill in the details. Name, website, phone, address, map coordinates, opening hours and social profiles.
  • 3. Watch the code build. The JSON-LD updates as you type, with color-coded syntax so it’s easy to read.
  • 4. Check it. A checklist marks each item as done, recommended or missing, with a score at the top.
  • 5. Copy and test. One click copies the code, and a second button opens Google’s Rich Results Test to confirm it.
03 — Build

Small, fast and fully in the browser

The tool is one Code Snippet: a shortcode for the form and a little vanilla JavaScript, with the CSS loaded only on pages that use it. There’s no API call, so it costs nothing to run and can’t be abused like a public AI tool.

  • Hours grouped like Google expects. Days with the same opening and closing times are combined into one entry instead of seven.
  • Only valid links. Profile links that don’t start with http are dropped instead of breaking the markup.
  • Ready for a site with several schemas. Each business gets an @id based on its website, so other markup on the site can point to it.
  • Looks like a code editor. A dark code card with syntax colors, a copy button and a direct link to Google’s test.
// Group days that share the same hours into one entry
var groups = {};
DAYS.forEach(function(d){
  if (f.elements['d_' + d[0]].checked) {
    var k = v('o_' + d[0]) + '-' + v('c_' + d[0]);
    (groups[k] = groups[k] || []).push(d[1]);
  }
});

Edge cases I designed for

Blank fields make bad markup

Empty values can trigger warnings in Google’s tools. The generator only adds a property when it has a value, and only adds the address block once something is filled in.

Some businesses are two things

A med spa is both medical and beauty. Schema.org allows more than one type, so those options output both instead of forcing a single guess.

Hours aren’t always Monday to Friday

Each day has its own switch and times. Closed days are dimmed and left out, and days with matching hours are grouped automatically.

Copy has to just work

The copy button grabs the exact script tag shown, ready to paste in the page head, and confirms with “Copied ✓”.

04 — What I learned

Structured data is a translation layer

Building this made the difference between “required” and “recommended” concrete. Google needs only a name and an address to understand a local business, but hours, coordinates, photos and profiles are what help it match the site to the Business Profile and show richer results. It also reminded me that the best small tools do one job well and explain themselves.

What I’d build next

Add FAQ and service schema, let users paste an existing site URL to pre-fill the form from its current markup, and offer a one-click WordPress export for the sites I maintain.

NEXT PROJECT

Have a site to build or fix?

Tell me about the project, or about a role you’re hiring for. I reply within one business day.