Building codes for windows in Spain: dos and don'ts when replacing
· María Fernández · Standards and permits · 10 min read
Replaced windows without permission and received a €3,000 fine? Installed white frames, but the property manager demands brown ones? Has a neighbor complained about glare from your mirrored glass? We’ll break down building codes by region, the required permits, and common restrictions that can turn renovations into a headache.
Basic legislation — what applies throughout Spain
The Technical Building Code (CTE - Código Técnico de la Edificación) sets minimum requirements for the entire country. Since 2019, an updated version of the DB-HE on energy efficiency has been in effect, which specifically applies to windows.
Mandatory CTE requirements for new and replacement windows:
- Thermal transmittance coefficient (U-value) no more than 2.0-3.5 W/m²K depending on the climate zone
- Minimum air permeability class 2 (class 3 for buildings taller than 15 m)
- Minimum sound insulation of 30 dB for facades facing streets with daytime noise levels up to 65 dB
- Safety glass (tempered or laminated) for glazing below 55 cm from the floor
- Minimum emergency exits of 0.80 x 1.00 m in certain rooms
The CTE divides Spain into climate zones from α (warmest) to E (coldest). The Canary Islands are primarily in zone α, with minimal requirements. Madrid is in zone D, with stricter requirements. The Pyrenees are in zone E, with maximum insulation requirements.
Violating the Energy Efficiency Standards (EES) by replacing more than 25% of a building’s windows carries a fine of €3,000 to €30,000. Insurance companies may refuse to pay out in the event of a fire or other incident if the windows do not meet safety standards.
Regional Peculiarities – Where the Rules Are
Autonomous communities have the right to tighten federal regulations. Catalonia and the Basque Country are particularly active in this area.
Starting in 2024, Catalonia will require energy efficiency class A windows for new buildings (a maximum U-value of 1.4 W/m²K for the entire window). The decarbonization plan provides for 40% subsidies for window replacement in buildings over 40 years old, but only for windows with a U-value of less than 1.8.
Due to its humid climate, the Basque Country imposes stricter watertightness requirements – a minimum of class 7A for coastal buildings. The Renove program includes mandatory energy audits before and after window replacement. Andalusia is focusing on heat protection. From 2023, solar control solutions (maximum g-value of 0.50) or external shading systems will be mandatory for south-facing buildings. Special regulations apply in the historic centers of Seville, Cordoba, and Granada.
Madrid requires a minimum of 32 dB sound insulation for all façade windows within the M-30, and 35 dB for buildings near major roads. A new air quality plan may impose restrictions on reflective coatings.
Valencia tightened standards for ground floors in risk zones after the floods. Windows must withstand a water pressure of 1 meter for 24 hours. Special frames and seals increase the cost by 30-40%.
Municipal Restrictions - The Devil is in the Details
Municipalities regulate the appearance of buildings through the PGOU (Plan General de Ordenación Urbana) and ordinances. These regulations are often stricter than regional ones.
Barcelona in the Eixample district requires the preservation of the original window patterns of modernist buildings. Replacing wooden frames with PVC is prohibited, even if the PVC imitates wood. Only wooden or wood-aluminum windows are permitted, preserving the original divisions into sections. The fine for violation is up to €90,000.
Madrid in the historic center (inside the M-30) requires approval of the color and material of windows with the Historic Heritage Commission. The approval process takes 2-4 months. In PAU (new development) districts, there are fewer restrictions, but there are requirements for uniformity of façades.
Seville prohibits altering the size of window openings in the historic center. Air conditioners cannot be mounted on the facade, making it important to choose energy-efficient windows. White frames are mandatory in most traditional neighborhoods.
Bilbao, after renovating its industrial zones, established minimum glazing requirements (40% of the facade) for new lofts. At the same time, noise protection of at least 40 dB is required due to the proximity to the port and railway.
Palma de Mallorca restricts the use of dark frames and tinted glass in tourist areas. Roller shutters must be built-in or match traditional Malorcan Persian shutters. Modern external blinds are often prohibited.
Historic buildings are a special case
Buildings included in the protected heritage index (BIC - Bien de Interés Cultural or included in the municipal index) are subject to strict restrictions.
Protection levels:
- Integral — no changes to the exterior, including windows
- Estructural — windows can be replaced with identical ones
- Ambiental — windows can be replaced with similar ones with approval
For buildings with Integral protection, the only option is restoration of the original windows with the addition of a second glazing system on the inside. The cost of such restoration starts at €800 per square meter, which is 3-4 times more expensive than replacement.
In Salamanca, Santiago de Compostela, and Toledo, almost the entire historic center has some level of protection. Even replacing broken glass requires notification to the municipality.
The good news: exceptions to energy efficiency regulations are often granted for historic buildings. Bad: Approval for any work takes 3-6 months and requires a design from an architect with a heritage license.
Procedures and Permits — A Bureaucratic Quest
Window replacement may require different permits depending on the scope of work and the type of building.
Declaration of Responsibility (Declaración Responsable) — a simplified procedure for replacing windows without modifying openings in standard buildings. Submitted to the municipality, work can begin immediately. Cost: €50-200, depending on the municipality. The review period is technically immediate, but the municipality may review the application within 3 months.
Minor License (Licencia de Obra Menor) — required for changing the size of openings, installing roller shutters, or modifying the façade. Technical documentation (memoria técnica) from an architect or technical architect is required. The license costs 2-4% of the work budget. Obtaining the license takes 1-2 months.
Major License (Licencia de Obra Mayor) — for replacing more than 50% of the building’s windows or making structural changes. A full project from an architect, approval from the Architects’ Association, and sometimes an energy efficiency calculation are required. Cost: 4-6% of the budget. Duration: 2-6 months.
Approval with the owners’ association is mandatory for elements that change the building’s exterior. By law, a 3/5 majority is required for façade changes, but courts often rule in favor of uniformity. Recommendation: obtain written approval before starting work.
Energy Performance Certificate — New Requirements
Since 2021, an energy performance certificate (CEE) is mandatory when selling or renting out real estate. Windows directly affect the certificate’s class.
Upgrading from class E to class C with new windows can increase the property’s value by 3-5%. For an apartment costing €300,000, this represents a €9,000-€15,000 increase in price. Meanwhile, replacing windows can cost €5,000-€8,000—an obvious benefit.
Important: Keep all documentation for your windows (certificates, specifications, and invoices). Without them, the technician performing the energy certification will provide only basic specifications, and the energy efficiency rating will be lower than the actual rating.
Subsidies and tax incentives — how to get your money back
PREE 2 Plan (until 2026) offers subsidies for energy efficiency improvements:
- 40% of the cost of work for primary residences
- Up to 60% for vulnerable households
- Maximum €3,000 per residence
- Requirement: at least 30% reduction in energy consumption
Regional programs are often more generous than federal ones:
- Catalonia: up to €5,000 per apartment in buildings over 40 years old
- Basque Country: 50% subsidy up to €6,000 + interest-free loan
- Madrid: 30% up to €4,000 + fast-track processing (1 month)
Tax deductions in the IRPF:
- 20% of the investment up to €5,000/year for a 7% reduction in consumption
- 40% up to €7,500/year for a 30% reduction
- 60% up to €15,000 for achieving class A or B
Requirements for subsidies:
- Energy audit before and after work (cost €300-600)
- Installation by a certified contractor
- Windows with CE marking and energy class
- Submission of documents within 3 months of work
Typical violations and fines
Installation without a permit — a fine of €300-3,000 + work legalization. If legalization is not possible (e.g., if it does not meet standards), you will have to return the original windows at your own expense.
Changing the exterior appearance in the historic center - a fine of €6,000-€90,000 depending on the building’s protection level. In Barcelona, there was a case of a €60,000 fine for replacing wooden frames with PVC in a modernist building.
Violating the uniformity of the façade - a fine of €600-€6,000 plus an obligation to bring it into compliance. The community can sue and demand compensation for the decrease in the building’s value.
Installing an air conditioner on a façade in a prohibited area - a fine of €750-€3,000 plus removal. Therefore, energy-efficient windows are important as an alternative to air conditioners.
Exceeding the light reflectivity level (mirror glass) - rare, but it does happen. The fine is €300-€1,500 if neighbors prove discomfort. There have been precedents in Marbella.
Practical tips - how to avoid problems
Before purchasing windows:
- Check the building’s security rating on the municipality’s website
- Review the homeowners’ association rules
- Take photos of your neighbors’ windows - this is an acceptable sample
- Request specific requirements in writing from the municipality
When preparing documents:
- Hire a local technical architect—they know the specifics.
- Apply for subsidies before starting work.
- Get written approval from the community, even if it’s not required.
- Keep all correspondence with the administration.
During installation:
- Request an installation certificate from the contractor.
- Take photographs of the work stages for records.
- Don’t throw away old windows until inspections are complete.
- Check the CE marking on each window.
After installation:
- Register the warranty with the manufacturer.
- Renew the energy performance certificate if you plan to sell.
- Apply for a tax deduction in your next tax return.
- Keep the documents for at least 10 years.
Specifics of popular urban developments.
Coastal urban developments often have color regulations (usually white or brown), a ban on mirrored glass (they’ll dazzle from the sea), and wind resistance requirements (class C4-C5).
Mountain urbanizations require consideration of snow loads, increased insulation, and often require wooden or wood-like frames to blend into the landscape.
Gated communities (urbanizations with security) have their own aesthetic regulations, often stricter than municipal ones. Review the Estatutos and Normas de Régimen Interior before purchasing.
Social housing (VPO) has restrictions on façade modifications during the protection period (10-30 years). Permission from the housing department of the autonomous region is required.
Future legislative changes
2025-2026: CTE energy efficiency requirements are expected to become more stringent. The U-value for new buildings may decrease to 1.0-1.5 W/m²K in all zones.
2027: Mandatory certification of window installers under a European program is planned. This may increase installation costs by 10-15%.
2030: As part of the decarbonization plan, a ban on windows rated lower than B may be introduced for replacement in residential buildings. This should be taken into account when choosing windows now.
Local trends: Barcelona and Madrid are discussing mandatory installation of air quality sensors in windows of new buildings. Valencia is considering subsidies for smart, automated windows.
Compliance with regulations isn’t just bureaucracy for bureaucracy’s sake; it’s a guarantee of safety, energy efficiency, and property value preservation. Taking the time to research the requirements before starting work will save you money and frustration down the road.



