The midfielder has inked terms to 2030, with his previous deal set to run to 2026.
Pedri told the club's website: "I'm very happy to renew and prolong this dream. Now, I'm going for it and continuing to win titles. It's the best thing that's happened to me in a long time and I'm happy to be where I want to be most.
"I'm going to continue enjoying football and being at Barcelona . Renewing means a lot, now I have to restore the confidence on the pitch, play as well as possible and win titles, which is what this Barça is made for. It's been my dream since I was little and prolonging it is the best thing that could have happened to me. I've dreamed of this since I was little and reality always surpasses dreams.
"It's been a long time since I felt like this, I'm enjoying football, which is what I like the most. We have a good team, especially a very young one. In a few years it will be even better. Good things are coming for Barcelona fans and as a Barça supporter, I have to enjoy and give joy."