Skip to tool
FeuTex · free tools runs in-browser no bloat built by LiMiT

Online Schema Generator Tool (JSON-LD)

Create valid JSON-LD structured data fast. Pick a schema type, fill the essentials, and generate compact or pretty output. Everything runs locally in your browser (no network calls).

Category: SEO · URL: /tools/online-schema-generator-tool.html

Schema type + quick fields

Schema type
Tip: use Load template to get a good starter JSON.
Name
URL
Image / Logo URL
Description (optional)
Validate the result with: Schema Checker JSON (offline)

Settings JSON (input)

Edit as JSON. This tool generates JSON-LD from these settings.

Generated JSON-LD (output)

Privacy: runs locally in your browser. No uploads, no tracking scripts.

How to use

Use this tool to build a JSON-LD block you can paste into your page.

  1. Select a schema type.
  2. Optionally fill the quick fields (Name, URL, Image, Description).
  3. Click Load template (or edit the Settings JSON directly).
  4. Choose Prettify and/or Wrap in <script>.
  5. Click Generate, then copy or download.
Keywords this page targets (natural cluster): online schema generator tool, json-ld schema generator, structured data generator, schema markup generator online, organization schema generator, local business schema generator, article schema generator json-ld, product schema generator json-ld, faq schema generator, breadcrumb schema generator, website schema generator, searchaction schema generator, generate schema markup offline, create json-ld script tag, schema.org generator, json-ld template generator, schema markup for wordpress, validate json-ld output, schema generator for seo, generate faqpage json-ld
Secondary intents covered: Generate JSON-LD for a specific schema type (Organization, LocalBusiness, Article, Product, FAQ, Breadcrumbs, WebSite)., Wrap JSON-LD in a <script type="application/ld+json"> tag for easy paste into HTML., Remove empty fields to keep markup clean and smaller., Prettify or minify schema output for readability or compactness., Create FAQPage and BreadcrumbList arrays from simple inputs., Copy or download the generated schema as a .json file.

FAQ

What does this online schema generator produce?

It generates Schema.org JSON-LD for common types like Organization, LocalBusiness, Article, Product, FAQPage, BreadcrumbList, and WebSite.

Does it work offline?

Yes. All generation happens in your browser and the tool code does not call any network APIs.

Can I paste the output directly into HTML?

Yes—enable “Wrap in <script>” to output a ready-to-paste <script type="application/ld+json"> block.

What input format does the tool accept?

JSON settings in the left textarea. Click “Load template” to start with a valid structure for the selected type.

Will it remove empty fields?

Yes—enable “Remove empty fields” to strip blank strings, nulls, and empty objects/arrays for cleaner markup.

Is this a full schema validator?

No. It does basic required-field checks; use the FeuTex Schema Checker JSON tool to validate and debug offline.

Can I generate multiple schema blocks at once?

This tool generates one JSON-LD block per run. For multiple blocks, generate each and add them separately (or merge into an array on your site).

'; } function applyQuickFieldsToInput(){ const inputEl = $('toolInput'); if(!inputEl) return; const parsed = tryParseJSON(inputEl.value); if(!parsed.ok) return; const obj = parsed.val; const typeSel = $('schemaType'); const t = typeSel ? typeSel.value : (obj.type || obj['@type']); obj.type = t; const name = $('qName')?.value || ''; const url = $('qUrl')?.value || ''; const img = $('qImage')?.value || ''; const desc = $('qDesc')?.value || ''; if(name.trim()) obj.name = name.trim(); if(url.trim()) obj.url = url.trim(); if(img.trim()){ if(t==='Organization' || t==='LocalBusiness') obj.logo = img.trim(); else obj.image = img.trim(); } if(desc.trim()) obj.description = desc.trim(); inputEl.value = JSON.stringify(obj, null, 2); } function getTemplateForType(t){ const commonOrg = { type: t, name: 'Example Name', url: 'https://example.com/', logo: 'https://example.com/logo.png', sameAs: ['https://www.linkedin.com/company/example'] }; if(t==='Organization') return commonOrg; if(t==='LocalBusiness'){ return { type: 'LocalBusiness', name: 'Example Business', url: 'https://example.com/', image: 'https://example.com/storefront.jpg', telephone: '+1-555-555-5555', priceRange: '$$', address: { '@type':'PostalAddress', streetAddress:'Street 1', addressLocality:'City', postalCode:'12345', addressCountry:'US' }, geo: { '@type':'GeoCoordinates', latitude: 40.0, longitude: -70.0 }, openingHoursSpecification: [ { '@type':'OpeningHoursSpecification', dayOfWeek: ['Monday','Tuesday','Wednesday','Thursday','Friday'], opens:'09:00', closes:'17:00' } ], sameAs: ['https://www.instagram.com/example'] }; } if(t==='WebSite'){ return { type:'WebSite', name:'Example Site', url:'https://example.com/', searchUrlTemplate:'https://example.com/search?q={search_term_string}' }; } if(t==='Article'){ return { type:'Article', headline:'Example article headline', description:'Short summary of the article.', url:'https://example.com/blog/example-article', image:['https://example.com/images/cover.jpg'], authorName:'Author Name', publisherName:'Example Publisher', publisherLogo:'https://example.com/logo.png', datePublished:'2025-01-15', dateModified:'2025-01-15' }; } if(t==='Product'){ return { type:'Product', name:'Example product', description:'Key product benefit in one sentence.', image:['https://example.com/images/product.jpg'], sku:'SKU-123', brandName:'Example Brand', price:'19.99', priceCurrency:'USD', availability:'InStock', offerUrl:'https://example.com/product/example' }; } if(t==='FAQPage'){ return { type:'FAQPage', questions:[ { q:'What is this?', a:'A short, clear answer.' }, { q:'How do I use it?', a:'Fill the fields and generate JSON-LD.' } ] }; } if(t==='BreadcrumbList'){ return { type:'BreadcrumbList', items:[ { name:'Home', url:'https://example.com/' }, { name:'Category', url:'https://example.com/category' }, { name:'Current Page', url:'https://example.com/category/current' } ] }; } return { type:t }; } function generateFromText(inputText, opts){ const options = opts || {}; const parsed = tryParseJSON(inputText); if(!parsed.ok) throw new Error(parsed.err); const data = parsed.val; const typeOverride = options.typeOverride; const t = typeOverride || data.type || data['@type'] || 'Organization'; // Build typed schema let schema = buildSchema(t, data); // Basic validation (minimal, not exhaustive) if(t==='Organization') requireFields('Organization', schema, ['name','url']); if(t==='LocalBusiness') requireFields('LocalBusiness', schema, ['name','url','address']); if(t==='WebSite') requireFields('WebSite', schema, ['name','url']); if(t==='Article') requireFields('Article', schema, ['headline','url']); if(t==='Product') requireFields('Product', schema, ['name']); if(t==='FAQPage'){ if(!Array.isArray(schema.mainEntity) || schema.mainEntity.length===0) throw new Error('FAQPage needs at least 1 question in questions[] or mainEntity[].'); const bad = schema.mainEntity.some(q=>!q || q['@type']!=='Question' || !q.name || !q.acceptedAnswer || !q.acceptedAnswer.text); if(bad) throw new Error('FAQPage questions must include q/a (or name/acceptedAnswer.text).'); } if(t==='BreadcrumbList'){ if(!Array.isArray(schema.itemListElement) || schema.itemListElement.length===0) throw new Error('BreadcrumbList needs items[] (name + url).'); } if(options.removeEmpty){ const cleaned = deepRemoveEmpty(schema); schema = cleaned || schema; } return formatOutput(schema, !!options.prettify, !!options.wrapScript); } function setOutput(text){ const outEl = $('toolOutput'); if(outEl) outEl.value = text; } function doGenerate(){ showError(''); const inputText = $('toolInput')?.value || ''; const prettify = !!$('optPrettify')?.checked; const wrapScript = !!$('optWrap')?.checked; const removeEmpty = !!$('optRemoveEmpty')?.checked; const typeOverride = $('schemaType')?.value || undefined; try{ const out = generateFromText(inputText, { prettify, wrapScript, removeEmpty, typeOverride }); setOutput(out); }catch(e){ setOutput(''); showError(e.message || String(e)); } } async function doCopy(){ showError(''); const text = $('toolOutput')?.value || ''; if(!text.trim()) return showError('Nothing to copy. Generate output first.'); try{ if(navigator.clipboard && navigator.clipboard.writeText){ await navigator.clipboard.writeText(text); } else { const ta = $('toolOutput'); ta.focus(); ta.select(); document.execCommand('copy'); } }catch(e){ showError('Copy failed: ' + (e.message || String(e))); } } function doDownload(){ showError(''); const text = $('toolOutput')?.value || ''; if(!text.trim()) return showError('Nothing to download. Generate output first.'); const rawType = $('schemaType')?.value || 'schema'; const safeName = (rawType || 'schema').toLowerCase().replace(/[^a-z0-9_-]+/g,'-'); const filename = safeName + '-jsonld.json'; const blob = new Blob([text], {type:'application/json;charset=utf-8'}); const url = URL.createObjectURL(blob); const a = document.createElement('a'); a.href = url; a.download = filename; document.body.appendChild(a); a.click(); a.remove(); setTimeout(()=>URL.revokeObjectURL(url), 500); } function loadTemplate(){ showError(''); const t = $('schemaType')?.value || 'Organization'; const tpl = getTemplateForType(t); const inputEl = $('toolInput'); if(inputEl) inputEl.value = JSON.stringify(tpl, null, 2); // best-effort fill quick fields if($('qName')) $('qName').value = tpl.name || tpl.headline || ''; if($('qUrl')) $('qUrl').value = tpl.url || tpl.offerUrl || ''; if($('qImage')) $('qImage').value = tpl.logo || (Array.isArray(tpl.image) ? (tpl.image[0]||'') : (tpl.image||'')); if($('qDesc')) $('qDesc').value = tpl.description || ''; setOutput(''); } function bindOnce(){ if(window.__feutexSchemaGenBound) return; window.__feutexSchemaGenBound = true; $('btnGenerate')?.addEventListener('click', doGenerate); $('btnCopy')?.addEventListener('click', doCopy); $('btnDownload')?.addEventListener('click', doDownload); $('btnTemplate')?.addEventListener('click', loadTemplate); $('btnReset')?.addEventListener('click', ()=>window.feutexReset()); $('schemaType')?.addEventListener('change', ()=>{ // keep input type in sync if JSON is valid const inputEl = $('toolInput'); if(!inputEl) return; const parsed = tryParseJSON(inputEl.value); if(parsed.ok && isPlainObject(parsed.val)){ parsed.val.type = $('schemaType').value; inputEl.value = JSON.stringify(parsed.val, null, 2); } setOutput(''); showError(''); }); for(const id of ['qName','qUrl','qImage','qDesc']){ $(id)?.addEventListener('input', ()=>applyQuickFieldsToInput()); } for(const id of ['optPrettify','optWrap','optRemoveEmpty']){ $(id)?.addEventListener('change', ()=>{ showError(''); }); } } window.feutexInit = function(){ bindOnce(); if(!$('toolInput')?.value?.trim()) window.feutexReset(); }; window.feutexReset = function(){ showError(''); if($('schemaType')) $('schemaType').value = 'Organization'; if($('optPrettify')) $('optPrettify').checked = true; if($('optWrap')) $('optWrap').checked = true; if($('optRemoveEmpty')) $('optRemoveEmpty').checked = true; if($('qName')) $('qName').value = 'FeuTex'; if($('qUrl')) $('qUrl').value = 'https://feutex.com/'; if($('qImage')) $('qImage').value = 'https://feutex.com/logo.png'; if($('qDesc')) $('qDesc').value = 'Tools for SEO and structured data.'; const starter = { type:'Organization', name:'FeuTex', url:'https://feutex.com/', logo:'https://feutex.com/logo.png', sameAs: ['https://www.linkedin.com/'] }; if($('toolInput')) $('toolInput').value = JSON.stringify(starter, null, 2); if($('toolOutput')) $('toolOutput').value = ''; }; window.feutexSelfTest = function(){ const tests = [ { name:'Organization minimal', input: JSON.stringify({type:'Organization',name:'FeuTex',url:'https://feutex.com',logo:'https://feutex.com/logo.png'}), expected: '"@type":"Organization"' }, { name:'FAQPage 2 questions', input: JSON.stringify({type:'FAQPage',questions:[{q:'What is JSON-LD?',a:'A JSON format for linked data.'},{q:'Is this offline?',a:'Yes.'}]}), expected: '"@type":"FAQPage"' }, { name:'Breadcrumb positions', input: JSON.stringify({type:'BreadcrumbList',items:[{name:'Home',url:'https://example.com/'},{name:'Blog',url:'https://example.com/blog'}]}), expected: '"position":1' }, { name:'Product offers mapping', input: JSON.stringify({type:'Product',name:'Widget',price:'19.99',priceCurrency:'USD',availability:'InStock',offerUrl:'https://example.com/p/widget'}), expected: '"price":"19.99"' } ]; let pass = 0; let out = ''; for(const t of tests){ try{ const gen = generateFromText(t.input, { prettify:false, wrapScript:false, removeEmpty:true, typeOverride: JSON.parse(t.input).type }); const ok = gen.includes(t.expected); out += (ok ? 'PASS' : 'FAIL') + ' - ' + t.name + '\n'; if(!ok){ out += ' Expected substring: ' + t.expected + '\n'; out += ' Got: ' + gen.slice(0, 160) + (gen.length>160?'...':'') + '\n'; } else { pass++; } }catch(e){ out += 'FAIL - ' + t.name + '\n Error: ' + (e.message || String(e)) + '\n'; } } out += (pass===tests.length ? 'ALL PASS' : ('PASSED ' + pass + '/' + tests.length)); return out; }; // auto-init when embedded if(document.readyState === 'loading'){ document.addEventListener('DOMContentLoaded', ()=>window.feutexInit()); } else { window.feutexInit(); } })();