Free for any website

Free XAUUSD and gold widgets for your website

Five live gold widgets for any site: the gold price in 65 currencies, whether the market is open, the gold–silver ratio, the day's price levels and the gold rate in 55 cities. See each one working, then copy its code.

Gold (COMEX futures)$3,795.2+35.0 (+0.93%)NextFOMC decision, projections and dot plotin 3d 15h · Wed 19:00 GMTWeekendopens in 19h 35mRange$168.2

Short answer: yes, you can put a live XAUUSD (gold in US dollars) widget on your website for free. Pick one of the five widgets below, copy its one-line script, or the iframe code if your site blocks scripts, paste it into an HTML block and publish. No sign-up, no API key, no fee; just keep the small credit line.

The gold price on the cards is a live price that follows near-month COMEX gold futures, and the card says so. Below each widget you will find what every line means and where its number comes from.

Gold price today

Live gold price per troy ounce and per gram (24K and 22K) in US dollars or any other currency on our gold price pages, with the change since the previous session's close and an updated stamp.

Sizes: card 300 × 250 and small 300 × 120. Code name: gold-price. Credit links to the gold price page for the chosen currency.

Dark theme
Light theme
Small, 300 × 120
Small, light

What each line shows

  • Price per troy ounce: What one troy ounce (31.1034768 grams) of gold costs at the live price, in the chosen currency.
  • Day change: How far that price has moved since the previous trading day's close, in money and in per cent; green when up, red when down.
  • Per gram 24K: The ounce price divided by 31.1034768, counting 24K as pure gold.
  • Per gram 22K: The 24K gram price times 0.9167 (22 parts gold in 24).
  • Small print: "Indicative price, follows COMEX gold futures. Excludes taxes and making charges." If the live price cannot be reached it reads "Indicative price (last COMEX futures data)" and the card uses our data file's latest price.
  • Updated (time): The time of the live price, in the visitor's own clock (of our last data refresh if the live price could not be reached). "Cached" instead means the widget is showing saved numbers.
Show the code for this widget

Is the gold market open now?

An open or closed badge, the session that is running (Asia, London, New York or the overlap) and a live countdown to the next open or close, in each visitor's own time zone.

Sizes: card 300 × 250. Code name: market-open. Credit links to Gold market hours.

Dark theme
Light theme

What each line shows

  • OPEN or CLOSED: Whether the main gold futures market is trading now: open from Sunday 6 pm to Friday 5 pm New York time, with a pause from 5 pm to 6 pm on Monday to Thursday.
  • Now: The session running, as the widget defines them on weekdays: Asian (Sydney 07:00 to 16:00 or Tokyo 09:00 to 18:00 local time), London (08:00 to 17:00 London), New York (08:00 to 17:00 New York), the London + New York overlap, Between main sessions, Daily pause or Weekend break.
  • Closes in / Opens in: A countdown to the next close or open, ticking every second.
  • Closes / Opens (day and time): When that change happens in the visitor's own time zone, with the zone named. Public holidays are not included, and the card says so.
Show the code for this widget

Gold–silver ratio

How many ounces of silver buy one ounce of gold, the gold and silver prices, and where the ratio sits in its 1-year range.

Sizes: card 300 × 250. Code name: gold-silver-ratio. Credit links to Gold-silver ratio.

Dark theme
Light theme

What each line shows

  • The ratio: How many ounces of silver one ounce of gold buys: the gold futures price divided by the silver futures price.
  • Gold /oz (COMEX): The latest COMEX gold futures price in our data file. It is not the live price, so it can differ a little from the gold price card.
  • Silver /oz: The latest COMEX silver futures price in our data file.
  • 1-year range bar: The lowest and highest daily ratio over about the last year (252 sessions), with a marker at today's value.
  • Updated (time): When our data file was last refreshed, in the visitor's own clock.
Show the code for this widget

Today's gold levels

Yesterday's close, the daily pivot, R1 and S1 and the 20-day average, from the same maths as our daily analysis page. Education, not signals.

Sizes: card 300 × 250. Code name: gold-levels. Credit links to Gold price levels today.

Dark theme
Light theme

What each line shows

  • Gold (COMEX futures): The latest COMEX gold futures price in our data file, on the same contract as the levels below.
  • R1, daily pivot, S1: Classic floor pivots from the previous finished session: pivot = (high + low + close) ÷ 3, R1 = 2 × pivot − low, S1 = 2 × pivot − high.
  • Prior COMEX close: The close of that previous session, on the same contract as the levels.
  • 20-day average: The average close of the 20 sessions before the current one.
  • Session of (date): The trading session these levels are for. The chip "Education, not signals" is part of the card.
Show the code for this widget

Gold rate by city

Today's 24K and 22K gold rate per gram for one city, in the local currency, from the same numbers as our city gold rate pages.

Sizes: card 300 × 250. Code name: city-gold-rate. Credit links to that city's gold rate page.

Dark theme
Light theme

What each line shows

  • 24K per gram: The live ounce price divided by 31.1034768, in the city's currency.
  • 22K per gram: The 24K gram price times 0.9167.
  • 10 grams 22K, or 1 tola 22K: Ten grams of 22K gold; for Indian cities one tola (11.6638038 grams) instead, the unit used there.
  • 24K per troy ounce: The ounce price in the city's currency.
  • Small print: "Indicative rate before VAT or GST, making charges and the shop's margin."
  • Updated (time): The time of the live price, in the visitor's own clock.
Show the code for this widget

Build your widget and copy the code

Pick a widget, a currency or city, a size and a theme. The preview and both codes change as you choose. Copy the code, paste it into your page and publish: the widget keeps itself up to date from then on.

Draws the widget right where you paste it. Needs a website system that allows scripts.
Use this where scripts are blocked or removed.

Where each number comes from, and how fresh it is

A widget is only useful if you can explain it to the reader who asks “what is this number?”. What each line means is written under each widget above. This section adds where every number comes from and how often it changes. Nothing here is a secret: the widget script is plain, readable JavaScript, and you can open it in your browser and check each line against the table. First, what each source in the table means:

  • Live price: a free public real-time feed that follows near-month COMEX gold futures, read by the visitor's browser.
  • Live price × exchange rate: the live price times the day's reference exchange rate for the chosen currency.
  • Live price vs its previous close: the live price compared with the same feed's previous trading-day close, which our site records from the feed when the market shuts at 5 pm New York time.
  • Worked out in the widget: arithmetic inside the widget on the ounce price.
  • Our COMEX futures data: our daily COMEX futures data file (a continuous front-month series).
  • Visitor's clock: the visitor's own clock and the market's weekly timetable; no price data.
  • Fixed text: words built into the widget.
Line on the cardSourceHow often it changes
Gold price today
Price per troy ounceLive price × exchange ratePrice every 15 minutes; rate once a day
Day changeLive price vs its previous closeWith the live price
Per gram 24KWorked out in the widgetWith the ounce price
Per gram 22KWorked out in the widgetWith the ounce price
Small printFixed textNever
Updated (time)Live priceOn page open, then every 15 minutes
Is the gold market open now?
OPEN or CLOSEDVisitor's clockEvery second
NowVisitor's clockEvery second
Closes in / Opens inVisitor's clockEvery second
Closes / Opens (day and time)Visitor's clockEvery second
Gold–silver ratio
The ratioOur COMEX futures dataWhen our site republishes its data, normally several times a day
Gold /oz (COMEX)Our COMEX futures dataWhen our site republishes its data, normally several times a day
Silver /ozOur COMEX futures dataWhen our site republishes its data, normally several times a day
1-year range barOur COMEX futures dataWhen our site republishes its data, normally several times a day
Updated (time)Our COMEX futures dataWhen our site republishes its data, normally several times a day
Today's gold levels
Gold (COMEX futures)Our COMEX futures dataWhen our site republishes its data, normally several times a day
R1, daily pivot, S1Our COMEX futures dataWhen our site republishes its data, normally several times a day
Prior COMEX closeOur COMEX futures dataWhen our site republishes its data, normally several times a day
20-day averageOur COMEX futures dataWhen our site republishes its data, normally several times a day
Session of (date)Our COMEX futures dataWhen our site republishes its data, normally several times a day
Gold rate by city
24K per gramLive price × exchange ratePrice every 15 minutes; rate once a day
22K per gramWorked out in the widgetWith the ounce price
10 grams 22K, or 1 tola 22KWorked out in the widgetWith the ounce price
24K per troy ounceWorked out in the widgetWith the ounce price
Small printFixed textNever
Updated (time)Live priceOn page open, then every 15 minutes

The price label, in plain words

The gold price in the widgets is labelled COMEX gold futures, and that label is deliberate. The price shown follows near-month COMEX gold futures, which usually sit close to, and often a little above, the London spot price traders see quoted as XAUUSD; the two move together.

What that means for your readers:

  • It is a live market price, not a shop price. It is the price of a gold futures contract traded on COMEX, the gold futures market run by CME Group in New York. Taxes, import duties, making charges and a dealer’s margin are not in it, which is why the gold price card and the city card both say so in small print.
  • It can differ a little from the XAUUSD quote on a trading platform. A platform quotes its own price for spot gold (gold for delivery now). A futures contract is gold for delivery later, so it normally trades slightly above spot. The gap changes from day to day and is different for each contract month, so the widget does not print one. Our guide to the free gold price widget shows the gap measured on real days, and the lesson on the futures basis and the roll explains why it exists.
  • It is an indicative price. It is good for showing roughly what gold costs right now and how far it has moved today. It is not a price anyone will deal at, and it should never be used to time an order.

Three kinds of time stamp

Look at the bottom-left corner of a widget. What it says tells you how fresh the numbers are.

  • “Updated 21:06 GMT+1” (the time in the visitor’s own clock, with their time zone named; when the numbers are from an earlier day it shows only the date, for example “Updated 30 Nov”): the gold price card, the city card and the ratio card print this. On the gold price and city cards it is the time of the latest live price (or, if the live price could not be reached, the time of our last data refresh; the gold price card then says “last COMEX futures data” in its small print). On the ratio card it is the time of our last data refresh, because the ratio and its gold and silver prices come from our data file, not from the live price.
  • “Cached 21:06 GMT+1” (or “Cached 30 Nov” from an earlier day): the visitor’s browser could reach neither our data file nor the live price, so the widget is showing the numbers saved into the script the last time our site was built. It is a warning label, not an error. As soon as the connection comes back, the widget returns to live numbers and the word changes back to “Updated”. The example times above are only to show the format: every visitor sees their own time and time zone.
  • “Session of 2 Dec”: the levels card prints the trading session its levels belong to (with “(cached)” after it when it is showing saved numbers). For the first hours of a new session, until our data file adds the new session’s row, it can still show the previous session’s levels. The date tells you which ones you are looking at.

The market-open card is different again: its foot says “Gold market, Sun–Fri”, because it uses no price data at all. It works everything out from the visitor’s own clock and the market’s weekly timetable.

Two honest limits of the levels card

The levels card is the one widget where a reader can be misled if nobody explains it, so here are its two weak spots, with real numbers.

1. The levels come from the day before. Take the levels the card showed for the session of Wednesday 2 December 2026. They were built from Tuesday 1 December’s finished session of COMEX gold futures: high 3,704.2, low 3,613.1, close 3,627.7. The arithmetic is the classic floor-pivot formula:

  • Daily pivot P = (3,704.2 + 3,613.1 + 3,627.7) ÷ 3 = 3,648.33
  • R1 = 2 × 3,648.33 − 3,613.1 = 3,683.57
  • S1 = 2 × 3,648.33 − 3,704.2 = 3,592.47
  • Prior COMEX close = 3,627.70

Those are exactly the numbers the card drew in our browser test on 2 December. They are reference points many chart readers watch. They are not predictions and not signals, which is why the card carries the chip “Education, not signals”. Our lesson on pivot points in gold shows how traders use them and where they fail.

2. The futures series changes contract month a few times a year, and the averages feel it. Our daily data follows the front COMEX contract, and on 30 November 2026 it moved from the December 2026 contract to February 2027, which traded about $28 to $29 higher. The 20-day average on the same card (3,823.04 for the session of 2 December) was the mean of 18 December-contract closes and 2 February-contract closes. Worked out on February closes for all 20 days, it would have been 3,851.30, about $28 higher. So for about four weeks after a contract change, the 20-day average sits lower (or, after a change to a lower-priced month, higher) than the contract the levels now follow. The pivot, R1 and S1 are built from one session only, so they are clean again from the first full session on the new contract.

When the market is shut

CME Group’s contract page gives the trading hours of its main gold futures as Sunday to Friday, 6:00 pm to 5:00 pm New York time, with a 60-minute break each day from 5:00 pm. In practice that means the market opens on Sunday evening, pauses for one hour at 5:00 pm New York time on Monday to Thursday, and closes for the weekend at 5:00 pm on Friday. Outside those hours the main contracts do not trade, so the price in the widgets stops moving. A visitor on Saturday sees Friday’s last price and Friday’s change, which is correct. The market-open card shows “Weekend break” or “Daily pause” and counts down to the reopening. It does not know about exchange holidays, and it says so on its face (“Public holidays not included”). For holiday hours and the full weekly timetable in your own time zone, link your readers to the gold market hours tool.

Every setting the code understands

Each widget is set by a few words in its code. In the script code they are data- attributes. In the iframe code the same settings sit in the address after the ?, joined by &. The table below lists every setting the widget script reads. There are no others: colours, fonts, borders and labels cannot be changed from the code.

SettingValuesIf missing or misspelt
data-widget
iframe: the address /embed/<name>/
every widget
gold-price, market-open, gold-silver-ratio, gold-levels, city-gold-rateAn unknown name shows the gold price card
data-currency
iframe: currency=
gold price only
A three-letter code from the list below, in capitals or notMissing or unknown: US dollars
data-city
iframe: city=
city rate only
A city name from the list below, written as shown, in capitals or notMissing or unknown: Dubai
data-size
iframe: size= (and set height="120")
gold price only
card (300 × 250) or small (300 × 120)Anything else: card. Ignored on the other widgets
data-theme
iframe: theme=
every widget
dark or lightAnything else: dark

We tested every row of that table in a real browser on 3 December 2026, including the mistakes. Three of the results are worth knowing before you edit a code by hand:

  • A wrong value never breaks the widget, but it can quietly change it. A currency code the widget does not know (we tried XYZ) shows US dollars. A city it does not know (we tried atlantis) shows Dubai. A theme other than light shows the dark theme. A widget name it does not know shows the gold price card. If your widget shows something you did not ask for, check the spelling first.
  • Capital letters do not matter. inr works like INR, and London like london.
  • The small size exists only for the gold price card. On any other widget data-size="small" is ignored and you get the normal card.

Here is a real example: the small gold price strip in Indian rupees, light theme, as the builder writes it.

<script src="https://www.xauusdglobal.com/assets/js/widget.js" data-widget="gold-price" data-currency="INR" data-size="small" data-theme="light" async></script>
<noscript><p style="font-size:12px;margin:4px 0 0">The live gold widget needs JavaScript.</p></noscript>
<p style="font-size:12px;margin:4px 0 0">Gold data by <a href="https://www.xauusdglobal.com/gold-price/india/" rel="nofollow noopener">XAUUSD Global</a></p>

And the levels card as an iframe, for a site builder that blocks scripts:

<iframe src="https://www.xauusdglobal.com/embed/gold-levels/?theme=dark" width="300" height="250" style="border:0;max-width:100%" loading="lazy" title="Today's gold levels widget"></iframe>
<p style="font-size:12px;margin:4px 0 0">Gold data by <a href="https://www.xauusdglobal.com/xauusd-analysis/" rel="nofollow noopener">XAUUSD Global</a></p>

Every currency and every city

The gold price card works in 65 currencies: the US dollar plus 64 others. The city card covers 55 cities in 21 countries and regions. These lists are produced from the same tables the widget script uses, so they always match what the widget accepts.

All 65 currency codes
CodeCurrency
USDUS dollar
INRIndian rupee
AEDUAE dirham
SARSaudi riyal
GBPBritish pound
EUReuro
NGNNigerian naira
ZARSouth African rand
MYRMalaysian ringgit
SGDSingapore dollar
AUDAustralian dollar
CADCanadian dollar
KESKenyan shilling
PHPPhilippine peso
IDRIndonesian rupiah
TRYTurkish lira
JPYJapanese yen
CNYChinese yuan
QARQatari riyal
KWDKuwaiti dinar
BHDBahraini dinar
OMROmani rial
EGPEgyptian pound
BDTBangladeshi taka
LKRSri Lankan rupee
NPRNepalese rupee
THBThai baht
VNDVietnamese dong
HKDHong Kong dollar
KRWSouth Korean won
TWDNew Taiwan dollar
GHSGhanaian cedi
TZSTanzanian shilling
UGXUgandan shilling
MADMoroccan dirham
CHFSwiss franc
MXNMexican peso
BRLBrazilian real
NZDNew Zealand dollar
PLNPolish zloty
SEKSwedish krona
ILSIsraeli new shekel
MURMauritian rupee
TTDTrinidad and Tobago dollar
GYDGuyanese dollar
ZMWZambian kwacha
JMDJamaican dollar
CZKCzech koruna
HUFHungarian forint
DKKDanish krone
NOKNorwegian krone
RONRomanian leu
UAHUkrainian hryvnia
ZWGZiG (Zimbabwe Gold)
ETBEthiopian birr
NADNamibian dollar
RWFRwandan franc
IQDIraqi dinar
JODJordanian dinar
COPColombian peso
PENPeruvian sol
ARSArgentine peso
CLPChilean peso
KZTKazakhstani tenge
UZSUzbek som
All 55 cities, with the name to put in the code
Country or regionCities
UAEDubai (dubai), Abu Dhabi (abu-dhabi), Sharjah (sharjah)
Saudi ArabiaRiyadh (riyadh), Jeddah (jeddah), Dammam (dammam)
QatarDoha (doha)
IndiaMumbai (mumbai), Delhi (delhi), Chennai (chennai), Bengaluru (bengaluru), Hyderabad (hyderabad), Kolkata (kolkata)
SingaporeSingapore (singapore)
MalaysiaKuala Lumpur (kuala-lumpur), Johor Bahru (johor-bahru)
IndonesiaJakarta (jakarta), Surabaya (surabaya)
PhilippinesManila (manila), Cebu (cebu)
JapanTokyo (tokyo), Osaka (osaka)
ChinaShanghai (shanghai), Beijing (beijing)
ThailandBangkok (bangkok)
Hong KongHong Kong (hong-kong)
NigeriaLagos (lagos), Abuja (abuja), Kano (kano)
KenyaNairobi (nairobi), Mombasa (mombasa)
South AfricaJohannesburg (johannesburg), Cape Town (cape-town), Durban (durban)
UKLondon (london), Manchester (manchester), Birmingham (birmingham)
EurozoneFrankfurt (frankfurt), Munich (munich), Paris (paris), Milan (milan), Amsterdam (amsterdam), Madrid (madrid)
TürkiyeIstanbul (istanbul), Ankara (ankara)
United StatesNew York (new-york), Los Angeles (los-angeles), Houston (houston), Chicago (chicago)
CanadaToronto (toronto), Vancouver (vancouver), Montreal (montreal)
AustraliaSydney (sydney), Melbourne (melbourne), Perth (perth)

The credit line under each code links to the gold price page for the currency or city you chose. The builder writes the right link for you. If you change the currency or city by hand, change the link too; a mismatch does no harm, it is just less useful to a reader who clicks it.

How wide and how tall: tested sizes

Both versions of every widget are designed for a 300-pixel-wide space, the usual width of a sidebar or a standard ad slot. Height is 250 pixels for the cards and 120 pixels for the small gold price strip.

The script version adjusts its width. It takes 300 pixels when there is room and shrinks to fit a narrower column. Its height stays fixed. We drew all 376 combinations (every currency in both sizes, every city, the other three widgets, both themes) at four column widths on 3 December 2026:

Column width What happened
300 px or more Everything fits, in every currency and city
280 px Everything fits, except that the levels card’s title is shortened with “…” and, in time zones with a long name (for example GMT+5:30), the end of the time stamp can be cut
260 px Two currencies with very long amounts (UGX and UZS) lose part of a line, and the market-open card’s foot is shortened
240 px Long amounts in many currencies (for example IDR, KWD, AED) are cut, city names are shortened and the time stamp is cut on most cards

So give the widget at least 280 pixels, and 300 if you use a currency with long amounts. Check your layout on a phone as well, because some themes add wide side margins.

The iframe version has a fixed height. It shows a page from our site inside a window. Its width shrinks with a narrow column in the same way (the code says max-width:100%), but its height is exactly the number in your code, and anything taller than the window is cut off with no scrollbar. In our test, an iframe of the levels card set to 200 pixels high lost the bottom 50 pixels: the 20-day average and the credit line. So keep height="250" for the cards and height="120" for the small strip, and if your site builder makes you draw the embed box by hand, draw it at least that big. The older iframe widgets further down this page are taller: 340, 360 and 400 pixels.

The theme is the card’s own colour, not your site’s. The dark theme is a near-black card with light text; the light theme is a white card with dark text. Pick the one that sits better on your page. The card has rounded corners and a thin border on both themes, so it reads as a separate box either way.

Adding the code to a site builder, a shop or a plain page

Every website system has a place that accepts raw HTML. The trick is to find it, because if you paste the code into a normal text box, your visitors will see the code as words instead of a widget. The names differ from one system to another, but they come in a few families:

  1. Block editors (the kind where you build a page from blocks): add a block called something like “Custom HTML”, “HTML” or “Code”, paste the script code into it, preview, then publish. For a sidebar or footer, look for a widget or section area that accepts the same kind of HTML block.
  2. Online shop themes: open the theme editor, add a section or block that accepts custom code (often called “Custom code” or “Custom HTML”), paste the code and save. To show the small price strip above a product list, add that section above the list.
  3. Drag-and-drop builders: these usually offer an “Embed” or “Embed HTML” element. Some of them place whatever you paste inside their own frame, so use the iframe code, then drag the element’s box to 300 × 250 (or 300 × 120 for the small strip) so no scrollbar appears.
  4. Blogging platforms with gadgets: add an “HTML/JavaScript” gadget or similar to a sidebar or footer, or switch a single post’s editor to its HTML view and paste the code there.
  5. A plain HTML page: paste the code anywhere inside the page’s <body> and upload the page. There is nothing to install.

Two rules save most of the trouble. First, if the script code shows nothing, try the iframe code in the same place before anything else: some systems remove scripts, some only on their cheaper plans, and most of those still allow iframes. Second, check the published page, not only the editor: many editors do not run embedded code while you are editing.

If you want click-by-click steps with the real menu names of the most common website systems, our platform-by-platform guide has them.

You can put several widgets on one page. They share one data download, so the second widget costs almost nothing.

If the widget is blank, cut off or showing the wrong thing

What you see Most likely cause What to do
Nothing at all Your website system removed the script Use the iframe code in the same place
The code itself, as text on the page It went into a normal text or paragraph block Paste it into an HTML, code or embed block
An empty box in the editor, fine once published The editor does not run embedded code Check the published page
The bottom of the card is missing The iframe or embed box is shorter than the widget Set the height to 250 (120 for the small strip)
Long amounts or the time stamp end in “…” The column is narrower than about 300 pixels Give the widget a 300-pixel-wide space
Dubai, US dollars or the gold price card when you asked for something else A misspelt city, currency or widget name falls back to the default Copy a fresh code from the builder, or check the spelling against the lists above
“Cached” in front of the time The visitor’s browser could not reach our data or the live price Nothing; it switches back to live numbers by itself
The price differs from a trading platform’s XAUUSD The widget shows COMEX gold futures; the platform shows its own spot quote Expected; see “The price label, in plain words” above
Nothing, and your site sets a strict security policy A Content-Security-Policy that does not allow our domain Allow https://www.xauusdglobal.com for scripts, styles and data requests (script-src, style-src, connect-src); for the iframe, allow it in frame-src

On that last row, two results from our own test with a strict policy (3 December 2026). If your policy allows our domain but not the outside live-price service, the widget still works: the gold price falls back to the latest COMEX futures price in our data file, and its small print changes to “Indicative price (last COMEX futures data)”. The live-price service’s address is written in the widget script, if you want to allow it as well. And if your policy blocks inline styles (no 'unsafe-inline' in style-src), everything draws except one detail: the marker on the ratio card’s range bar sits at the far left instead of at today’s value. Use the iframe code for that card, or allow inline styles.

Still stuck? Email info@xauusdglobal.com with the address of the page and the code you pasted.

What a widget asks of your visitors’ browsers

Before you paste someone else’s code into your site, you should know what it does. Here it is, all of it.

What it downloads. The script file, under 9 KB once compressed for the trip, and a small style sheet. Then our data file, about 70 KB compressed, which the browser keeps for five minutes, and a tiny file of recent daily closing prices; every widget on the page shares both. Finally, one request to an outside, free, public live-price service for the latest gold price. The script loads with async, so your own page never waits for it, and the iframe code carries loading="lazy", which tells the browser not to load the frame until the visitor scrolls near it.

How often it asks again. Once when the page opens, then every 15 minutes while the page stays open. The market-open countdown ticks every second, but that uses the visitor’s own clock, not the network.

What it keeps. Nothing. The script sets no cookies, writes nothing to the browser’s storage and runs no analytics or tracking. Like any web request, the requests above reach our server and the live-price service with the visitor’s IP address. If your privacy notice lists the outside services your pages contact, add both.

What it can touch on your page. Only the one empty box it adds where you pasted the code. The script draws its widget inside a sealed box (what browsers call a shadow DOM): its styles cannot leak into your page, and your page’s styles do not reach inside it, because the widget sets its own font, colours and sizes. The iframe is a separate page by design.

Screen readers. Each script widget is marked as a labelled region (for example “Gold price today in USD”), the market-open badge is announced as a status, the levels card’s label includes “for education, not signals”, and the iframe code carries a title that says what the frame contains. Keep the title if you edit the code.

If our site is down. Your page still loads normally. The widget shows its last saved numbers marked “Cached”, or stays empty in the rare case that even the script file cannot be fetched.

How the widgets sit in a real layout

Drawn mock-up pages with the real, live widgets inside. At 300 pixels wide, the usual sidebar and ad-slot width, the widgets drop into most layouts without any styling.

Your Trading Blog
Trading blog: a live open or closed badge and countdown in every reader's own time zone, in the sidebar of each post.
The Weekly Ledger
Markets newsletter: the gold–silver ratio and its 1-year range on the web edition of each issue.
Your Trading Course
Trading course: the day's pivot, R1 and S1 beside a lesson on support and resistance, marked as education.
Your City News
City news site: the small gold price strip in US dollars and the city card in the city's own currency, on a business page.

Embed our gold data charts

Writing about gold for a news site, blog or newsletter? Besides the live widgets above, the main chart of each of our data studies and data tools can be embedded on your page, free. Open the study and use the Embed this chart box under its chart: you get an iframe code that works everywhere and a one-line script that sizes itself to your column. The chart keeps the credit line "Chart: XAUUSD Global" with a link back to the study, and updates when we update the data.

Prefer to quote the numbers? Every study has a Cite this page box with a ready-made citation. Journalists will find our data, quotable facts and media contact on the press and media page.

Terms of use

  • Free for any site. Personal, commercial, education, news or newsletter: no sign-up and no fee.
  • Keep the credit line. "Gold data by XAUUSD Global" stays visible and clickable, with no hidden styling or overlays. The link is marked nofollow by default; you may set it however your site's link policy requires.
  • No hotlinking abuse. Use the widgets on web pages. Please don't poll our data file from servers, bots or apps, resell it, or present it as your own feed; we may block abusive traffic.
  • Information, not advice. Prices are indicative (a public real-time feed that follows near-month COMEX gold futures, our COMEX futures daily data for the ratio and levels, and daily exchange rates) and exclude taxes and making charges. Nothing in the widgets is a trading signal or financial advice.
  • Changes. We may improve or retire widgets; we keep existing embed codes working wherever we can.

Our earlier widgets

Already showing one of our first three widgets? They keep working, and the codes are here if you need them again. They are iframes only, 100% wide up to 420 pixels. Each takes ?theme=light at the end of its address for a white background, and the converter also takes a starting currency: ?currency=INR, or both joined with & (?theme=light&currency=INR). Visitors can still change the converter's currency and purity inside it.

Gold market hours

The Sydney, Tokyo, London and New York sessions in each visitor's own time zone. Preview

Gold price converter

Gold per gram, 10 grams, tola, ounce and kilogram in dozens of currencies, for 24K, 22K and 18K. Preview

Gold seasonality

Average gold return for every calendar month over the last 10 years. Preview

Frequently asked questions

Is there a free XAUUSD widget for my website?

Yes. This page has five free live gold widgets for any website: the gold price (XAUUSD, gold in US dollars, or gold in 64 other currencies), whether the gold market is open now, the gold–silver ratio, the day’s gold levels and the gold rate in 55 cities. Pick one, copy its code and paste it into an HTML block on your site. There is no sign-up, no API key and no fee.

Are the gold widgets really free?

Yes, for any website, blog, shop or newsletter, personal or commercial. There are no ads inside the widgets. The only condition is that the small credit line “Gold data by XAUUSD Global” stays visible.

What price does the gold widget show?

A live indicative price that follows near-month COMEX gold futures, the main gold futures market in New York, labelled “COMEX gold futures” on the card. The price shown follows near-month COMEX gold futures, which usually sit close to, and often a little above, the London spot price traders see quoted as XAUUSD; the two move together. The price excludes taxes, duties and making charges, and it is not a dealing price.

Why is the widget's price different from the XAUUSD price on my trading platform?

Because they are two different prices of the same gold. The widget follows a COMEX gold futures contract, which is gold for delivery later; your platform quotes its own spot price, gold for delivery now. Futures normally trade a little above spot, and the gap changes from day to day. The two move together, so the widget’s day change will usually look similar to your platform’s. Our gold price widget guide shows the gap on real days.

Does the widget slow down my site?

Not noticeably. The script is one small file with no libraries and loads with async, so it never holds up your page. All widgets on a page share one data download, and the iframe version uses loading=”lazy”, so it loads only when a visitor scrolls near it. The widget sets no cookies and does no tracking.

Can I remove the credit line?

Please keep it visible: a plain “Gold data by XAUUSD Global” line is the only thing asked in return. The link is marked nofollow, and you may set it however your own link policy requires.

How often does the data update?

The gold price is read from the live feed when the page opens and again every 15 minutes while it stays open. The gold–silver ratio and the levels come from our COMEX futures data, which is refreshed each time our site republishes its data, normally several times a day. Exchange rates change once a day, and the market-open countdown ticks every second from the visitor’s own clock. Every widget shows when its numbers were last updated, or which session its levels belong to.

Can I change the colours, font or size of a widget?

Only within the settings the code offers: a dark or a light theme for every widget, and a card or a small strip for the gold price widget. Colours, fonts and labels are fixed, because the widget draws inside its own sealed box that your site’s styles cannot reach. The script version shrinks to fit a narrower column; give it at least 280 pixels, and 300 for currencies with long amounts.

Can I use the widgets on a site builder or an online shop?

Yes. Paste the script code into a block or section that accepts custom HTML or code. If your website system removes scripts, paste the iframe code into its embed or HTML element instead and size the box to 300 × 250 (300 × 120 for the small strip). Our platform-by-platform guide has click-by-click steps for the most common systems.

Which version should I use, script or iframe?

Use the one-line script where your website system allows scripts: it fits the width of your column and the credit line sits on your own page. Use the iframe on systems that block or remove scripts. Both show the same live data. The iframe’s height is fixed, so keep the height in the code.

Which currencies and cities are available?

The gold price widget works in 65 currencies: the US dollar plus 64 others, from the euro, pound and yen to the UAE dirham and the Indian rupee. The city widget covers 55 cities, from Dubai, Riyadh and Mumbai to London, Lagos and Sydney. The full lists, with the code to type for each, are on this page.

Can I show more than one widget on a page?

Yes. Paste as many codes as you like. The script file and the data are downloaded once and shared, so each extra widget costs very little.

Are the levels trading signals?

No. Today’s gold levels are reference points worked out from the previous session’s prices (pivot, R1, S1) plus the 20-day average, shown for education. XAUUSD Global never gives buy or sell signals through the widgets, and the card says “Education, not signals” on its face.

Do the widgets work in an email newsletter?

Do not count on it. Email programs handle code very differently from web browsers, and we have not tested the widgets in them, so assume a widget pasted into an email will not appear. Put the widget on the web version of your issue, or link to our live gold price page from the email.

Is there an XAUUSD widget for Android phones?

Not as an app. These are website widgets, made to sit inside a web page, and we do not publish a phone app or a home-screen widget. On an Android phone you can get close: open the live XAUUSD price page in your browser, open the browser’s menu and choose Add to Home screen. That puts a one-tap shortcut to the live price on your phone. If you run a website, every widget on this page also works on phone screens.

Need a custom size, another currency or a city we don't cover yet? Email info@xauusdglobal.com.