Curious about spicing up your website with captivating visual elements? In this collection, we are featuring 40+ HTML and CSS particle backgrounds code examples sourced from reliable platforms such as CodePen and GitHub. 

We’ve carefully curated each example to provide web designers, developers, and UI/UX creatives with mesmerizing effects that add depth and interactivity to websites and web applications. As a result, it enhances user engagement in a way you’ve never seen before.

From gentle snowfall to lively confetti showers, and quantum effects to pure CSS particle animations, we have something for everyone. If you have basic knowledge of HTML, CSS, and JS, then you can customise each item to any extent. Be it size, colour, or behaviour, just align the particle background with your own unique style.

With CSS Particle Backgrounds, you can elevate your user-interface design and leave a lasting impression on your site audience! Let’s explore our inspiring collection of CSS particle background examples.

1. Vivant Logo & Particle Background


Author: Andrew
Source: Code / Demo
Created on: JULY 4, 2017
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS(SCSS), JavaScript

2. Pure CSS: Particle Background


Author: FlyC
Source: Code / Demo
Created on: JULY 16, 2016
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS(SCSS)

3. Only CSS: Particles


Author: Yusuke Nakaya
Source: Code / Demo
Created on: JULY 19, 2017
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML(Pug), CSS(SCSS)

4. CSS Particles


Author: Alexi Taylor
Source: Code / Demo
Created on: JUNE 29, 2017
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS(SCSS)

5. bootstrap social login with particle background

Author: Angeal
Source: Code / Demo
Created on: AUGUST 23, 2016
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML(Pug), CSS(Stylus), JavaScript(CoffeeScript)

6. CSS Particle Animation


Author: Nate Wiley
Source: Code / Demo
Created on: MAY 10, 2014
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS(SCSS)

7. tsParticles black hole with orbiting particles


Author: Matteo Bruni
Source: Code / Demo
Created on: JUNE 24, 2020
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS, JavaScript

8. Particle Cloud


Author: Will Browning
Source: Code / Demo
Created on: APRIL 2, 2016
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS(SCSS), JavaScript

9. HAML and CSS Particles (Reversed)


Author: Riley Adrianza
Source: Code / Demo
Created on: OCTOBER 14, 2022
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML(Haml), CSS(SCSS)

10. Quantum Project


Author: Lorenzo Verzini
Source: Code / Demo
Created on: JUNE 3, 2016
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS(Less)

11. Pure CSS Particle Animation


Author: 胡嘉仕
Source: Code / Demo
Created on: JULY 23, 2019
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML(Pug) ,CSS (SCSS)

12. Particle Background Portfolio Page


Author: vabhishek.me
Source: Code / Demo
Created on: APRIL 30, 2017
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS, JavaScript

13. Particles Background


Author: Nenad
Source: Code / Demo
Created on: MAY 11, 2015
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS, JavaScript

14. CSS Only Particle System


Author: Robin Selmer
Source: Code / Demo
Created on: FEBRUARY 07, 2017
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS(SCSS)

15. CSS Particles


Author: Giana
Source: Code / Demo
Created on: AUGUST 13, 2015
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML(Pug), CSS(SCSS)

16. Symmetrical Flow Fields


Author: Jeremy Wentworth
Source: Code / Demo
Created on: JULY 2, 2016
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS

17. Bubbly


Author: Alexis Munsayac
Source: Code / Demo
Created on: MARCH 4, 2019
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML(Slim), CSS(SCSS)

18. How To Create An Animated Particle Background Using CSS And JavaScript


Author: Envato Tuts+
Source: Code / Demo
Created on: DECEMBER 21, 2017
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS(SCSS)

19. Proximity Particles (No Canvas)


Author: Tibix
Source: Code / Demo
Created on: MARCH 20, 2018
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS

20. Galaxy CSS Particles


Author: ian gonza
Source: Code / Demo
Created on: MAY 04, 2019
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS

21. Particle background practise v2.1


Author: ANDREAS JV
Source: Code / Demo
Created on: APRIL 11, 2016
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS(SCSS), JavaScript

22. CSS Particle Animation


Author: Takeshi Kano
Source: Code / Demo
Created on: FEBRUARY 20, 2018
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML(Pug), CSS(SCSS)

23. Random Particles Animation


Author: Rémi Denimal
Source: Code / Demo
Created on: JULY 18, 2017
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML(Haml), CSS(Sass)

24. Emotionality


Author: leimapapa
Source: Code / Demo
Created on: MARCH 21, 2024
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS

25. BVAmbient – VanillaJS Background Particles


Author: Bruno Vieira
Source: Code / Demo
Created on: DECEMBER 2, 2020
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS, JavaScript

26. CSS Particles


Author: Paul
Source: Code / Demo
Created on: MARCH 27, 2019
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS(SCSS)

27. Particle Background Test


Author: Samurai Mac
Source: Code / Demo
Created on: NOVEMBER 24, 2017
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS(Less), JavaScript

28. Particles Following Camera


Author: Yusuke Nakaya
Source: Code / Demo
Created on: OCTOBER 23, 2019
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: (Pug), CSS (SCSS)

29. CSS Particle


Author: Dronca Raul
Source: Code / Demo
Created on: OCTOBER 24, 2018
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML(Haml), CSS(SCSS)

30. Particle Background Animation


Author: PHP Hacker
Source: Code / Demo
Created on: DECEMBER 30, 2021
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS(Pug), CSS (Stylus), JavaScript

31. CSS Particles


Author: Paolo Duzioni
Source: Code / Demo
Created on: FEBRUARY 11, 2018
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML(Pug), CSS(SCSS)

32.  Particle Swarm [Magnetic Field recreation]


Author: Bas Groothedde
Source: Code / Demo
Created on: OCTOBER 19, 2015
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS

33. CSS Particles Animation


Author: Noel C
Source: Code / Demo
Created on: MARCH 02, 2020
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML(Pug), CSS(SCSS)

34. Particle Background


Author: Gurpreet Kaur
Source: Code / Demo
Created on: OCTOBER 10, 2016
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS, JavaScript

35. Particles in Space


Author: Dean Wagman
Source: Code / Demo
Created on: JULY 13, 2015
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS, JavaScript(Babel)

36. JS – Canvas


Author: EvonDev
Source: Code / Demo
Created on: JANUARY 7, 2018
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS, JavaScript

37. Explosion Particle Animation


Author: Explosion AI
Source: Code / Demo
Created on: OCTOBER 1, 2016
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML (Pug), CSS (Sass), JavaScript(Babel)

38. CSS Particle Style Animation.


Author: John
Source: Code / Demo
Created on: MARCH 16, 2016
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML(Haml), CSS(SCSS)

39. Canvas Hexagonal Particle Effect


Author: Karl Saunders
Source: Code / Demo
Created on: APRIL 11, 2017
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS(SCSS), JavaScript

40. Glowing particle Background with text


Author: pranjal dubey
Source: Code / Demo
Created on: OCTOBER 11, 2021
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS

41. Grayscale Ambient Background


Author: jen
Source: Code / Demo
Created on: JULY 30, 2020
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS