DataJockey
TradeChord · All countries

Step 1 of 25: Spain in world trade

Source: World Bank WITS · release 2026-11 · reported goods trade, current US$

I · The world

2002–2023

Spain in world trade

A walkthrough of Spain's reported goods trade, from its place among the world's traders down to a single partner and product.

In 2023, Spain reported $420.2B of exports and $469.0B of imports.

Scroll, or use ↓ and ↑, to move through the story.

I · The world

Routes

Its 12 largest routes carry 59% of its trade

The map unfolds into a compass: each partner keeps its true direction from Spain, but distances are compressed so close neighbours no longer pile up. Circles are sized by trade.

Teal arcs carry Spain's exports out; orange arcs bring imports in. Each arc's width, and the dots flowing along it, scale with its 2023 value.

The other 41% is with smaller partners and the rest of the world, which are not drawn.

I · The world

Rank

#16 of 34 reporters by exports

The exports of all 34 reporters in this release replay from 2002 to 2023. Spain slipped from #14 to #16.

In 2023, Spain accounted for 2.2% of their combined exports.

2023 Scroll to move through the years, or

II · The country

Scale

Exports grew 3.3× since 2002

Exports went from $125.9B in 2002 to $420.2B in 2023; imports grew 2.8×, from $165.9B to $469.0B. Exports peaked in 2022 at $424.3B.

The sharpest fall in exports came in 2009 (−20%); the strongest rise in 2003 (+27%).

II · The country

Balance

A $48.9B trade deficit in 2023

Exports minus imports, year by year. Spain ran a surplus in 0 of the 22 years shown; bars above the line are surpluses, below it deficits.

II · The country

Openness

Goods trade equals 55% of GDP

Exports were 26% of GDP in 2023, against 18% in 2002; imports 29%. That is $9K of exports per person.

Among the 30 reporters, Spain ranks #17 by goods trade relative to GDP. Hubs that re-export can exceed 100%, because trade is counted gross while GDP counts value added.

GDP and population: World Bank, World Development Indicators (CC BY 4.0).

III · What it trades

What it sells

Transport equipment is 18% of exports

Each tile is a product group, sized by its 2023 export value. The three largest, transport equipment, chemicals and machinery & electronics, are shaded.

III · What it trades

How the mix changed

Transport equipment: 25% of exports in 2002, 18% in 2023

Each column is one year of exports, split by product group. The tiles fold into 2023 and history unrolls to the left.

Exports are more diversified than in 2002: the three largest groups made up 49% then and 42% now.

III · What it trades

What it buys

Machinery & electronics lead imports at 17%

The import mix differs from the export mix: machinery & electronics, fuels and transport equipment are the largest groups Spain buys.

III · What it trades

Net position

A net exporter in 7 of 16 product groups

Exports minus imports for each group in 2023. Teal bars to the right are groups Spain sells more of than it buys; orange bars to the left, the reverse.

Largest net export: transport equipment (+$17.9B); largest net import: fuels (−$40.3B).

III · What it trades

Net position over time

A net exporter of 7 groups in 2023, 4 in 2002

Each panel is one product group: the teal line is exports, the orange line imports, and the fill shows which was larger each year.

Base metals turned to surplus, food & beverages turned to surplus and animal products turned to surplus over the period.

IV · Who with

Who it trades with

France is the largest named partner

The ten largest partners by combined trade in 2023. The top five take 40% of Spain's exports.

IV · Who with

The network

Spain at the centre of its trade

The teal arc is Spain's exports; each orange arc is what Spain imports from that partner. Grey ribbons join the two: their width at Spain's end is exports, at the partner's end imports.

IV · Who with

The network over time

The network, rebuilt year by year

The same partners, replayed from 2002 to 2023: arcs swell and shrink with each year's trade.

France is the largest of them at both ends of the series.

2023 Scroll to move through the years, or

IV · Who with

What shifted

Poland gained the most export share

Share of Spain's exports going to each partner, 2002 against 2023. Poland rose from 1.0% to 2.3%; France fell from 19.0% to 15.0%.

IV · Who with

Surplus and deficit by partner

A surplus with 4 of 8 major partners

One panel per partner, 2002–2023: exports in teal, imports in orange, and the fill shows which was larger.

The widest gap in 2023 is with China (−$39.5B); France and Italy switched sides over the period.

V · Closest ties

Biggest relationship

Spain and France

The largest relationship with both flows reported. In 2023, exports to France were $63.2B and imports $41.3B.

V · Closest ties

Two ledgers

Spain and France keep different books

In 2023, Spain reported $63.2B of exports to France; France reported $62.9B of imports from Spain, 1% less. Across 22 years, France's figure averaged 12% below Spain's.

Solid lines are what Spain reports; dashed lines are the partner’s record of the same goods. The two rarely match: imports are usually valued including freight and insurance, and timing, re-exports and partner attribution differ.

V · Closest ties

What partners report · 2023

Partners account for 9% of the exports Spain leaves unattributed

For each partner that reports its own trade, the dark bar is what Spain says it exported there and the light bar what the partner says it bought.

Czechia, Ireland and Austria are not named in Spain's own data, yet together these partners record $13.0B of purchases from it, against $149.2B of exports Spain assigns to no named partner.

In all, these partners record $243.3B of purchases from Spain, against $232.7B that Spain assigns to them; much of the difference likely sits in the $149.2B it reports without a named destination.

Imports are usually valued including freight and insurance, so partner figures run somewhat higher even when the trade is the same.

V · Closest ties

France · 2023

What moves between them

Exports to the right, imports to the left. In 2023, transport equipment led both directions: $13.4B of exports and $7.91B of imports.

VI · Finest grain

Flows · 2023

From product to partner

Exports pour out of Spain on the left, split into product groups in the middle, and reach partners on the right. Grey streams are the smaller groups and partners combined.

The widest single stream, highlighted, is transport equipment to France: $13.4B.

VI · Finest grain

Flows · 2023

And back again

The same streams for imports, read from partner to Spain.

The widest is machinery & electronics from China: $19.1B.

VI · Finest grain

The single largest flow

Machinery & electronics from China

$19.1B in 2023, 4.1% of all Spain's imports.

This is the finest grain in the release: one partner, one product group, one year.

VI · Finest grain

Routes over time

2002–2023: the routes redrawn

Back to the map, replayed year by year: routes thicken, thin and change direction as trade shifts.

The route to France grew the most, from $51.2B of two-way trade to $104.5B.

2023 Scroll to move through the years, or

VII · Snapshot

2023 · on one page

Spain in 2023

Spain's trade at a glance: the headline numbers, its routes, and its largest products and partners.

Download it as an image to share.