Gold basics

How to Add a Free Live Gold Price Widget to Your Website or Blog

If you run a finance blog, a jewellery shop, a trading newsletter or a community page, a live gold widget gives visitors something useful every time they visit. Ours are free, need no sign-up or API key, and take about two minutes to add. Here's exactly how, platform by platform.

The short answer

You can add a free live gold widget to almost any website by pasting one line of embed code. Our free gold widgets page has three to choose from:

  1. Gold price converter: gold per gram, 10 grams, tola, ounce and kilogram in 19 currencies, for 24K, 22K and 18K.
  2. Gold market hours: the Sydney, Tokyo, London and New York sessions in each visitor’s own time zone, and whether gold is open right now.
  3. Gold seasonality: the average gold return for each calendar month over the last 10 years, with the current month highlighted.

There’s no sign-up, no API key and no cost. Copy the code, paste it into an HTML block, publish. The widget then updates itself.

Which widget suits your site?

Your site Best widget Why visitors like it
Jewellery shop or gold buyer Gold price converter (set to your currency) Shows today’s price per gram and tola at a glance
Trading blog or education site Market hours, plus converter Answers “is gold open now?” in each reader’s time zone
Finance newsletter or news site Converter or seasonality A live number or chart next to your gold articles
Trading community or forum Market hours Members in different countries see their own times
Personal finance blog Seasonality Gives context for “is this a good month for gold?” posts

The embed codes

Each widget is an <iframe>, a small window that shows a page from our site inside yours. Here is the converter code exactly as it appears on our widgets page:

<iframe src="https://www.xauusdglobal.com/embed/gold-converter/" width="100%" height="360" style="border:0;max-width:420px;border-radius:12px" loading="lazy" title="Gold price today widget"></iframe>
<p style="font-size:12px;margin:4px 0 0">Gold price today by <a href="https://www.xauusdglobal.com/xauusd-price/">XAUUSD Global</a></p>

The other two follow the same pattern:

Widget Address to use in src Suggested height
Gold price converter https://www.xauusdglobal.com/embed/gold-converter/ 360
Gold market hours https://www.xauusdglobal.com/embed/market-hours/ 340
Gold seasonality https://www.xauusdglobal.com/embed/gold-seasonality/ 400

The easiest way to get the full code, including the credit line, is the Copy code button under each widget on the widgets page.

Step by step: adding the widget to your platform

WordPress (block editor)

  1. Open the page or post in the editor.
  2. Click the + button and search for Custom HTML.
  3. Paste the embed code into the block.
  4. Click Preview to check it, then Update or Publish.

To show the widget in a sidebar on a classic theme, go to Appearance → Widgets, add a Custom HTML widget to your sidebar and paste the code there.

Wix

  1. In the editor, open Add Elements and choose Embed Code, then Embed HTML.
  2. Choose the Code option and paste the embed code.
  3. Drag the box to the size you want; a width of about 420 pixels suits the widgets well.
  4. Publish your site.

Squarespace

  1. Edit the page and add a Code block.
  2. Paste the embed code and make sure the display is set to HTML.
  3. Save and publish.

Blogger

  1. Go to Layout and click Add a Gadget in a sidebar or section.
  2. Choose HTML/JavaScript, paste the code and save.

Plain HTML site

Paste the code wherever you want the widget to appear inside your page’s <body>, then upload the page. Nothing else is needed: there are no scripts to install.

Menu names on website builders change from time to time. If you can’t find an option, search your platform’s help pages for “embed HTML” or “iframe”.

Customise the widget

You can change the look with a few simple edits to the code.

What you want How to do it
Light background Add ?theme=light to the end of the address, e.g. .../embed/market-hours/?theme=light
Default currency on the converter Add ?currency=INR (or AED, GBP, MYR and other listed codes)
Light theme and a currency Join them with &: .../embed/gold-converter/?theme=light&currency=INR
Wider or narrower Change max-width:420px in the style, or the width value
Taller, to avoid scrollbars Increase the height value by 20–40
Square corners Change border-radius:12px to 0

A width of 100% with a max-width means the widget fills narrow phone screens but doesn’t stretch awkwardly on wide desktop layouts.

Why the widgets won’t slow down your site

Page speed matters for both visitors and search rankings. The embed code includes loading="lazy", a standard browser feature that delays loading an iframe until the visitor scrolls near it. Each widget is a small, self-contained page, so:

  • it never blocks your own content from loading;
  • if our site is ever slow, your page still loads normally;
  • there are no third-party scripts added to your own page.

The title attribute in the code also helps screen-reader users understand what the frame contains, so keep it.

Where the data comes from

  • Converter: COMEX gold futures prices and daily exchange rates, refreshed automatically on our servers several times a day. It is the same engine as our live gold price page. The maths behind grams and tolas is explained in our guide to gold price per gram, tola and kilo.
  • Market hours: calculated live in each visitor’s browser using exact daylight-saving rules. It matches our full gold market hours tool.
  • Seasonality: monthly COMEX gold futures closes over the last ten completed years, from our gold seasonality tool.

The converter shows an indicative price based on futures and exchange rates. It is not a dealer quote: jewellery and coin prices include making charges, dealer premiums and local taxes, so the price a shop charges will be different. The widgets show information only and are not trading signals.

Troubleshooting

Problem Likely cause Fix
Widget shows a scrollbar Height too small Increase height by 20–40
Blank box in the editor Some editors don’t preview iframes Check the published page instead
Code appears as text Pasted into a normal text block Use a Custom HTML, Embed or Code block
Widget too wide in a sidebar Fixed width in the code Use width="100%" with a max-width
Platform strips the code The plan blocks iframes or custom HTML Check your platform’s plan; some free plans limit embeds

Need a custom size or have a question? Email info@xauusdglobal.com.

Key takeaways

  • Three free widgets: gold price converter, gold market hours and gold seasonality.
  • Copy one line of code from the widgets page and paste it into an HTML block.
  • Use ?theme=light and ?currency=XXX to customise; adjust width and height in the code.
  • Lazy loading keeps your pages fast, and the data updates itself.

Sources

Educational content only, not financial advice. Trading gold with leverage carries a high risk of loss.

Frequently asked questions

Is there a free gold price widget for websites?

Yes. XAUUSD Global offers three free gold widgets: a gold price converter (per gram, 10 grams, tola, ounce and kilogram in 19 currencies), a live gold market hours clock, and a gold seasonality chart. There is no sign-up or API key; you copy one line of code.

How do I add a gold price widget to WordPress?

In the WordPress block editor, add a Custom HTML block where you want the widget, paste the embed code from our widgets page, then preview and publish. In a classic theme you can also paste it into a Custom HTML widget in a sidebar.

Can I show the gold price in Indian rupees or another currency?

Yes. Add ?currency=INR (or another listed currency code, such as AED, GBP or MYR) to the end of the converter’s address in the embed code. Visitors can still switch currency inside the widget.

Will a gold widget slow down my website?

No. Each widget is a small, self-contained page that loads in an iframe with lazy loading, so it only loads when a visitor scrolls near it and never blocks the rest of your page.

Do I need to update the widget myself?

No. The widgets update automatically. The converter and seasonality data refresh on our servers several times a day, and the market hours clock runs live in each visitor’s browser.

Can I use the gold widgets on a commercial website?

Yes. They are free for personal and commercial sites. We only ask that you keep the small credit line under the widget.

Sources and further reading

External sites are independent of XAUUSD Global. Check dates and data yourself.