Skip to content
XRD Analyzer
WebAssembly-Powered SciPy Engine

Free XRD Analysis Tool — Online X-Ray Diffraction Analyzer

Perform peak fitting, background removal, and multi-phase CIF matching directly in your web browser with 100% local computing privacy. Eliminate slow desktop software install times and analyze your diffraction data on-the-fly using advanced SciPy algorithms.

No sign-up required
Runs in your browser
Free forever
Advertisement

What is X-Ray Diffraction (XRD)?

X-Ray Diffraction (XRD) is a rapid and non-destructive analytical technique used for phase identification of a crystalline material and to provide information on unit cell dimensions. When a sample is bombarded with collimated monochromatic X-rays, the electromagnetic waves interact with the regular arrays of atoms in the crystal lattice. Because the wavelength of X-rays is of the same order of magnitude as the spacing between atomic planes, this interaction leads to constructive and destructive interference, creating a characteristic diffraction pattern.

Materials scientists and researchers use powder XRD to identify mineral compositions, analyze crystalline structure defects, determine preferred orientation in thin films, and measure amorphous fractions. Every crystalline compound has a unique diffraction fingerprint. By matching the angles and relative intensities of experimental reflections to libraries of simulated standards, researchers can determine the phase makeup of complex mixtures.

Understanding Bragg's Law

The fundamental physics of X-ray scattering is governed by Bragg's Law. Constructive interference occurs only when the path length difference of waves scattered from successive lattice planes is equal to an integer multiple of the X-ray wavelength. This relationship is mathematically expressed as:

nλ = 2d sin(θ)

In this equation, n represents the order of diffraction (usually an integer set to 1), λ is the electromagnetic wavelength of the incident X-rays (for copper targets, the $K\alpha_1$ line is typically $1.54056$ \AA), d is the interplanar spacing between the parallel sheets of atoms in the crystal, and θ is the angle of incidence.

Peak Positions and Broadening Significance

The angular position of a diffraction peak is determined entirely by the size and shape of the unit cell. Changes in lattice parameters (due to thermal expansion, chemical doping, or residual stresses) will cause peaks to shift to different $2\theta$ angles. Conversely, the width of a diffraction peak contains information about the microstructure. Specifically, the Full Width at Half Maximum (FWHM) of a peak increases as the size of the coherent crystalline domains decreases. Understanding peak broadening is crucial for nanostructured materials design and thin-film characterization.

The Scherrer Equation Explained

To estimate the size of sub-micron crystals, scientists apply the classic Scherrer equation. This mathematical relation links the physical dimensions of coherent crystalline domains (often called crystallites) to the line broadening of their diffraction peaks:

D = Kλ / (β cos(θ))

Where:

  • D: The mean size of the ordered crystalline domains (in Angstroms or nanometers).
  • K: A dimensionless shape factor. Typical values range from $0.89$ to $0.94$, with $0.90$ often assumed for spherical nanoparticles with cubic lattices.
  • λ: The X-ray source wavelength (e.g., $0.15406$ nm for copper anodes).
  • β: The line broadening at half the maximum intensity (FWHM) in radians. Instrument-induced broadening must be subtracted first.
  • θ: The Bragg angle (half the $2\theta$ coordinate of the peak centroid).

While the Scherrer equation is standard, researchers must remember its limitations. It does not account for lattice strain (which also broadens peaks), and it is not reliable for crystallites larger than 100-200 nm, as the broadening contribution becomes too small to distinguish from instrument limits.

Supported File Formats

The XRD Analyzer parses standard text columns and binary formats from major diffractometer brands. Use the table below to format your input data:

Format Extension Description & Layout
Raw X-Y coordinates .xy Two space-separated or tab-separated columns containing $2\theta$ values and matching intensities. No headers.
Comma-separated values .csv Standard spreadsheet export. Ensure columns are ordered: $2\theta$ angle followed by intensity.
Raw text log .txt Columns of raw intensities. Text files can contain custom headers; the parser will skip leading metadata blocks automatically.
Bruker raw scan .raw Standard binary format from Bruker diffractometers. Extracted and parsed locally using Python's raw bytes read scripts.
PANalytical diffraction markup .xrdml Structured XML format representing PANalytical scan cycles. Extracted automatically using local node DOM parser structures.

Professional Features for Diffraction Analysis

Everything you expect from standard desktop crystallographic software, running instantly in your web browser.

Peak Detection & FWHM Fitting

Automatically isolate reflection centroids and compute Full Width at Half Maximum (FWHM) using numerical Pseudo-Voigt fitting functions on the fly.

Read scientific guide →

Background Removal (SNIP)

Clean high-noise baselines and amorphous scatter features using the standardized SNIP algorithm (Statistics-sensitive Non-linear Iterative Peak-clipping).

Learn SNIP settings →

Crystallite Size Calculation

Apply the classic Scherrer equation with automated correction configurations for spherical crystallite shape factors and radiation wavelengths.

Read Scherrer guide →

Williamson-Hall Analysis

Deconvolute microstrain broadening from crystallite size limits using linear Williamson-Hall regressions on peak parameters.

Read microstrain details →

Multi-Phase CIF Match

Upload crystallographic structures in CIF format to simulate stick patterns using structural factors, calculating Figure-of-Merit (FOM) matches.

Learn matching logic →

COD Database Search

Directly query Crystallography Open Database records by name, mineral, or elements combination, and load them instantly for analysis.

Database search tips →

Standard Workflow for Processing Patterns

Follow these four simple steps to preprocess, isolate, index, and export your diffraction outputs.

1

Upload Data File

Import your raw experimental diffraction scans. Supports standard `.xy`, `.csv`, `.txt`, Bruker `.raw`, or Panalytical `.xrdml` formats.

2

Clean the Pattern

Apply digital filters: remove amorphous baseline noise using the SNIP algorithm, smooth signal jitter, and strip copper $K\alpha_2$ reflections.

3

Isolate & Fit Peaks

Use the peak finding subroutine to automatically calculate $2\theta$ angles, matching d-spacings, peak areas, and FWHM values with Pseudo-Voigt profiles.

4

Match & Export

Upload mineral CIF structures to match reflection patterns, run crystallite sizing, and download SVG charts or standard CSV files.

Frequently Asked Questions

Technical answers to common questions about online data fitting and phase matching algorithms.

Is this XRD analyzer really free?

Yes, the XRD Analyzer is completely free for academic, personal, and commercial research. All calculations are executed directly within your web browser using WebAssembly. This architecture means we do not need to host expensive server-side computing resources, allowing us to keep this portal free of charge indefinitely. There are no sign-up forms, usage limits, or hidden subscriptions.

What file formats does XRD Analyzer support?

Our parser supports standard text files like `.xy` containing plain, space-separated or tab-separated two-theta and intensity columns. We also support standard comma-separated value `.csv` formats, space-separated column `.txt` outputs, and raw binary formats such as Bruker `.raw` files or PANalytical XML-based `.xrdml` scans. If you encounter errors, make sure you strip headers or convert the file to raw columns in text format first.

How accurate is the Scherrer equation for crystallite size?

The Scherrer equation provides a quick and reliable estimation of crystallite size but has specific boundaries. It works best for crystallites smaller than 100 nm, as larger grains do not produce measurable peak broadening. Additionally, the equation does not separate microstrain or instrument broadening automatically. For accurate size reporting, you must subtract instrument broadening using standard reference materials and select an appropriate shape factor ($K \approx 0.9$).

Can I use multiple CIF files for phase matching?

Yes, our tool supports loading multiple Crystallographic Information Files (CIF) simultaneously to handle multi-phase identification. When you upload multiple CIF documents, the system simulates the Bragg reflections for each structure, overlays them on your experimental plot as distinct color-coded vertical stick markers, and computes independent Figure-of-Merit (FOM) match coefficients so you can evaluate the phase contribution of each compound.

Does my XRD data leave my computer?

No, your data is processed entirely client-side. The experimental files you upload, the CIF documents you parse, and the fitting calculations you run remain inside your browser instance. Pyodide executes all calculations locally using a sandboxed WebAssembly virtual machine, and your file data is never sent to our servers. This design ensures complete privacy for proprietary, unpublished materials science research.

What is FWHM in XRD and why does it matter?

Full Width at Half Maximum (FWHM) measures the width of a diffraction peak at half of its maximum height. It is a critical parameter because peak broadening is inversely proportional to crystallite size. Measuring FWHM allows you to calculate grain sizes using the Scherrer equation. Peak width is also affected by lattice defects, microstrain, and the instrument's optical geometry, all of which broaden the diffraction profile.

What is the Williamson-Hall method?

The Williamson-Hall (W-H) method is a mathematical technique used to separate the effects of size and microstrain on peak broadening. While both size and strain widen diffraction reflections, they vary differently with the diffraction angle. By plotting $\beta \cos\theta$ against $4\sin\theta$, the slope of the linear fit reveals the lattice microstrain, while the y-intercept provides the strain-corrected crystallite size.

How do I find a CIF file for my material?

You can download CIF documents from open databases such as the Crystallography Open Database (COD) or the Materials Project. Our integrated search search panel queries the COD directly, letting you find structures by chemical formula or mineral name and load them instantly. You can also import local CIFs from publications or custom unit cell simulations.

Advertisement

X-Ray Diffraction Glossary

A comprehensive guide to terms, variables, and algorithms used in powder diffraction and crystallography.

2θ Angle

The angle between the primary un-scattered X-ray beam and the direction of the diffracted beam. In powder diffraction experiments, detectors scan along this $2\theta$ arc to measure scattered intensities. The position of these peaks corresponds directly to crystal lattice d-spacings through Bragg's law.

Bragg's Law

A fundamental equation of diffraction, formulated as $\lambda = 2d \sin\theta$, where $\lambda$ is the radiation wavelength, $d$ is the crystallographic interplanar spacing, and $\theta$ is the angle of incidence. It describes the conditions for constructive interference of X-rays scattered from atomic planes.

CIF File

Crystallographic Information File (CIF) is a standard text format for representing atomic structures. It documents lattice parameters, space groups, symmetry constraints, and fractional coordinates, enabling simulation engines to compute theoretical diffraction patterns and match phase identities against scan results.

Crystallite Size

The average size of a single coherent crystalline domain inside a larger grain or powder sample. It is different from particle size, as a single physical particle can contain multiple boundaries. It is calculated from reflection broadening using the Scherrer equation.

d-spacing

The perpendicular distance between parallel planes of atoms within a crystal structure. Measured in Angstroms (\AA), d-spacing determines peak locations. Spacings shrink as the diffraction angle increases, representing planes with higher Miller indices.

FWHM

Full Width at Half Maximum (FWHM) represents the width of a reflection peak at 50% of its maximum intensity. It is a critical metric for estimating grain boundaries and structural microstrains, as smaller domains produce broader peaks.

HKL Indices

Integers ($h, k, l$) that define specific planes of atoms in a crystal lattice. In diffraction, they index reflection peaks. The structure factor calculations use these indices to calculate how atoms constructively interfere along these specific plane orientations.

Lattice Parameter

The physical dimensions and shapes of the unit cell, defined by three lengths ($a, b, c$) and three angles ($\alpha, \beta, \gamma$). They govern the lattice volume and interplanar d-spacings, dictating the exact angle coordinates where reflections can occur.

Miller Indices

A system of notation in crystallography for planes in crystal lattices. They are defined as the reciprocals of the fractional intercepts of the plane with the unit cell axes, reduced to lowest integer terms. In XRD, they identify the plane families causing diffraction.

Peak Broadening

The widening of diffraction peaks beyond instrument-induced limits. Peak broadening is caused by physical factors, primarily small crystallite sizes (coherent domains) and internal lattice strains (dislocations, vacancy defects, stacking faults).

Phase Identification

The process of matching experimental diffraction profiles against database records of known chemical compounds. By comparing peak positions and intensities, researchers determine the mineral composition of unknown powder mixtures.

Rietveld Refinement

An advanced mathematical methodology that fits a complete theoretical model of the crystal structure to a whole measured diffraction scan. It refines atomic coordinates, thermal factors, and instrument factors using least-squares algorithms to determine accurate crystal geometries.

Scherrer Equation

A formula relating crystallite size to peak broadening: $D = K\lambda / (\beta \cos\theta)$. $\beta$ is the FWHM in radians, $\lambda$ is the X-ray wavelength, and $K$ is the shape factor. It is widely used to evaluate nanocrystalline sizes under 100 nm.

Space Group

A description of the 3D symmetry of a crystal, representing how unit cells repeat under translation, rotation, reflection, and screw axis translations. The space group dictates reflection rules, indicating which HKL planes can produce constructive diffraction peaks.

Williamson-Hall Plot

A linear regression method used to separate size and strain broadening. By plotting $\beta \cos\theta$ against $\sin\theta$ for multiple peaks, the slope indicates the lattice microstrain, and the y-intercept indicates the average grain size.