YouTube Transcript:
9. Java Memory Management and Garbage Collection in Depth
Skip watching entire videos - get the full transcript, search for keywords, and copy with one click.
Share:
Video Transcript
hey guys welcome to concept and coding
and this is shreyansh so today we are
going to very very important topic in
Java Java memory management right and
before we start so I want to say that
please excuse my voice I have a little
bit cold so I'm sorry for that so here
if you see that
till now we have covered a Basics like
how to create a class how to create a
primitive data types how to create an
object right how to call a method so
this thing should comes to your mind
right hey shreyansh how do we manage how
do we the memories are allocated to them
right so let's understand this today
because this is very very important
interview questions and plus when you
start working in the company you will
see that how much importance is given to this
this
okay so now let's start this
so there are two types of memory when
I'm saying memory it's I'm talking about Ram
Ram
right so there are two types of memory which
which
Java creates stack and Heap
and when we are talking about the memory
management who manage this memory jvm
jvm is the one which managed this memory
right and it creates it divides the
memory into two part stack and he and it
stores different type of data inside it
so let's see first what kind of data
stored in a stack and what kind of data
stored in Heap
so let's say this this is your stack
now here if you see that I am creating
multiple copies of it I'll tell you why
and let's say this is your HEAP so
generally Heap has more memory than a step
step
okay and it's only have one copy
now what kind of data is stored inside a stack
stack
so first of all it is stored temporary
variables right so let's say you have
created a method inside a block and you
created a variable in t equals to 10. so
its life is very temporary with the
within this Open Bracket and closing
bracket after that it got destroyed
so this is known as temporary variables
right so all temporary variables are
okay then
then
separate memory block for method so
whenever a method has been created so
let's say this is inside of one
particular method public
public
get something
so for each method there is a block
memory frame you can say that stores
and inside that
method whatever the variables whatever
the difference it's created it will
store inside this memory frame
okay so we will I will tell you an
example with this one but first let's go
through this what kind of data is stored
and we will see the example it will
clarify you more okay but let's see this
store primitive data type so this is
also nothing but a primitive data type
so primitive data type is stored within
a stack
store reference of the Heap object
whenever you create an object like new
with the new keyword whenever you create
an object it is stored inside a heap
its memory but its reference reference
reference of
of object
object
so this type of reference I will tell
you later but first understand what kind
of data is stored so but there are
different type of reference a strong
reference weak reference soft reference
pantham references right so I will tell
you uh later but first understand what
kind of data we stored
each thread has its own stack memory so
now you know that is why I have created
multiple copies of Stack because is
thread so this is let's say thread one
has its own stack memory this is thread
two has its own stack memory thread
three has own stack memory third phone
has its own
but if you see that all the threads
Shear is common Heap memory okay
okay
variables within a scope is only visible
and as soon as variables goes out of the
scope it gets deleted from the stack in
the lifo order so what I mean to say is
that everything is here in the stack is
within a scope everything has a scope I
will tell you how so just waited for it
for an example you will get to know how
this Leaf order is performed and what is
mean by the scope
when the stack memories goes full you
will get this error stack Overflow error
okay now let's understand this with the
example right this is very simple class
if you see
I have created a class memory management
and I have one public static void main
so it's one method
okay so this method has one primitive
data type
one object
one string literal
right one object I created to invoke this
this
another method and I'm doing an invoking
of this method
and then you can say that this has
invoked this
and inside this I have another reference
to an object
another string literal and another
string object this is not a string
literal so this is string object using
new keyword
so it's a very very simple class we have
covered methods variables right so you
should be easily understanding this what
I have written
but now let's understand this how memory
is stored for this one
Heap memory Heap memory is always larger
than a stack and
so here let's see this
first of all main method is invoked
whenever the main method is invoke I
told you for each method a block of
memory is
stored so let's say I have stored this
block memory this is for
for Main
so this is one scope for the main
this Frame you can call this as one
frame of memory
for which method mean and all the
variables which are created inside this
main method it would be stored in its block
block okay
okay
so now let's say main method is called
we have created its memory
memory
now I have created a
primitive variable primitive variable
primitive variable
variable
10. so as you know that primitive
variable does not hold any reference it
stored the value itself so it is stored
into the
this memory of this scope
the second is
I am creating a new object new person so
this is your object
person object
and this percent object has a reference
who is storing the difference person obj
so it has one
person obj so this holds a reference to
this memory okay
okay
now I am creating one string literal so
as you already know from the previous
variable class that string literals
stores the data into the string pool and
where does the string pull stores string
pool is saved inside
the Heap only so there is something called
called
string pool
so whenever you are creating a literal
string literal so it would be stored
here 24 okay and what is the difference
string literal so it will create a
reference variable string
string literal
literal
and it is storing a reference to this 24.
24.
okay now the third line is new memory
management so see I am creating one more
object now so let's create one more
object here
I have created one more object what is
the object
memory management memory
memory
management object and its references
inside mem obj in the same main one
So currently if you see that all are
within a scope so scope is still going
on scope is not yet finished
okay so within a scope you can access
all the variables
right within a scope so this is a scope
within a scope you have access to all
so now ma'am obj is storing a reference
to memory or memory management object
now I am invoking a method memory
management test and passing this
reference so now you see that I am
creating an another method so for each
method it will create a new reference
so I am creating an another frame
which method memory management test method
method
so this scope
is for
memory management test method
this is kovis for Main and now this is for
for
this one so this is its oh
this method frame memory frame
so first of all
it has this
person obj
and what reference it has
so we pass the reference of this one new
person so new person is here so this is
okay now
now
see I have created uh another reference
which is pointing to Which object
whatever the person object is pointing
to so I have created another reference
person obj2
person obj 2
and it is pointing to the same memory
which person obj was pointing person obj
was pointing to this so it was also
same okay
okay now
now
I have created one more string literal
24 so whenever I as you know from the
previous class whenever you created a
string literal first it will check into
the string pool so is this literal
present 24 is present if yes it will not
create new it will use the same so it
will create
string literal 2 reference string
literal 2 and it point to the same from
then its create a string literal 3 and
it's a not a little it's a new object
because I'm using a new keyword so it
create a new object which is string object
object
and has the value 24 but it is inside a
new this one a string
literal 3 and it's storing this
reference here
now if you see that
I have got a closing bracket whenever
you get a closing bracket means scope is
finished whenever the scope is finished
you have to delete all the variables or
references created within that scope so now
now
this scope is finished for the memory
management test when the memory
management scope is finished it will
delete this scope
it will delete this scope right so now
if you see that it's going in the le4
manner last and first out so this one
was the added last after main but it is
the first one to get deleted when this
scope is get deleted so all this will
also get removed so now
this is removed
so this reference
after that
this get removed
okay now after that
this will get removed inside this this
will get removed right so this reference
after that
this will get also removed
so its reference will also be removed
so now you see that
it has done
remove this
memory management test method frame and
all the variables we have created we
have removed in a lifo manner we have
cleaned up okay
okay
now it moved to here now the control
come backs to here this method is
completed now main method closing
bracket has been reached now main method
closing bracket has been reached means
main method scope is also finished so we
are removing
this also when we are removing this so
what we are doing is we have to remove
this memo BJ
when memo widget is removed we have to
delete this reference so this reference
is removed
then we remove string literal and this
reference will be deleted
okay then person obj reference is deleted
deleted
its reference will also be deleted then
then
this value will be deleted so now if you
see that the method execution is completed
completed
right stack is empty
and everything is done but now you have
noticed one thing here
what we have deleted the references
which was pointing but what about this
objects which now created in the Heap
how we will delete those because they
are reference when their references was
deleted so whatever was pointing that we
have deleted that reference
but now these objects are left in the
Heap who will clean this up
that's where the garbage collector comes
into the picture garbage collector is
used to delete the unreferenced object
from the Heap
so now for this object is there any reference
reference
from the stack no there is no reference
so garbage collector will remove this
now it will check hey is there any
reference is anybody referencing no
nobody is referencing this will also be
freed up
hey for person object is there anybody
referencing no nobody is referencing
this will also be freedom
okay similarly for the string pull if it
is not used afterward it would be removed
removed
right so this all will be done by
garbage collector garbage collector runs
periodically right jvm controls jvm
controls when to run the garbage
collector so see
so in your application code if you write
this command you are telling that hey
run the garbage collector and garbage
collector will try to scan the Heap hey
what all object there is no reference if
you find any object for which there is
no reference it will delete it but jvm
says that
there is no guarantee that even if you
type this I will run the GC so running
the garbage collector is totally depend
upon jvm
so jvm has full control over garbage
collector whether I should run it or
when to run it okay so even though you
write it there is no guarantee that
garbage collector will run and that's
why it is called as automatic
memory management
right so you don't have to worry about
freeing up the memory jvm takes care of
it automatically it periodically it
keeps on checking the Heap memory and if
it seems that okay Heap memory is
filling up fast so it will run the
garbage collector more periodically more
faster if it see that okay we have I
have sufficient space no need to worry
jvm may run a garbage collector very less
less
okay so you understand that
so now you have understood this
stack memory how it stores the block how
it store the variable how it is stored
the primitive data type how it is stored
the references now I'll tell you about this
this
strong reference week reference
okay and also you have already know
about how each threaded's own stack memory
memory
variables within a scope is only visible
and as soon as the variable goes out of
the scope it gets deleted in leaf order
I think you get it by the scope right
so this variable is not visible inside
this scope
right so each variable is visible within
and when the stack memory goes full it
shows stack Overflow error okay so now
let's understand this what are the
so now in a simple way I have told you
this way that
for a stack
this is a stack
this is he
AP stores the object
this stores the reference
of object
so now let's say this example I have
created here person
person obj equals to new person
okay so I've created an object of person
and P object is the reference to it so
this is p o b j it's a reference to this
this is known as strong reference
right so this is known as the strong
reference like how we are using it as of
today mostly this is known as a strong
reference so when garbage collector
invokes now garbage collector runs now
we see that hey is there anyone who is
referencing to this object it will see
that yes there is a strong reference so
it will not delete this it will survive okay
okay
weak reference how you create a weak
reference there is a class called weak reference
reference
you want to create a weak reference of person
now you are saying that okay this is weak
weak
p o b j
of person
and you are creating a new object new
okay now see this
whenever you create an object like this
so you are creating a new person object
let's say you are creating another new
person object
okay so this is another P person object
but you are making a weak reference
right you are creating it a weak
reference so now here you are creating a
weak
p o b j so there is a reference
but it's a week
what does it weak means weak means that
as soon as the garbage collector runs as
soon as garbage collector get invoked it
will freed up this space
right so it's not like a strong strong
says that hate garbage collector don't
delete my object because I have a strong
reference somebody is using it
but weak reference is that till garbage
collector is not run I am able to access
it but let's say garbage collector runs
it is not mandating the garbage
character that you cannot freed up a if
you run free it up right and if we try
to access what object what value it will
get null
okay so that's the difference between
strong and weak strong tells the garbage
collector that do not delete this I have
a reference
but week says that I have a reference I
can access the value but if you runs you
can feed it up right as soon as you turn
you can feed him you can make it free
and if I try to access it after that I
might get null value so that's weak
and there is something called Soft reference
reference
soft reference is a type of weak
reference right what it tells is hey
garbage collector you are allowed to
feed it up even though I have a soft
reference but only do it when it is very
very very urgent very very urgent means
that there is no more space and you have
to create a space then go ahead you can
remove it no problem okay
okay
so only difference between a weak and
soft is like weak is like as soon as
garbage collector will run it will feed this
this
it will remove this object
soft reference tells that that yes
garbage collector you are allowed to
free this
but do it if it is very very urgent and
you need the space very urgent okay so
okay so generally we hardly use this in
the company we are mostly using a strong
reference part okay but it's good to
know this we have this type of
references also weak reference soft
reference a strong reference if there is
a strong reference present to an object
this object will never get deleted till
a strong reference is present
a weak reference is present as soon as
garbage collector will run it will
remove this no matter weak reference is
present or not and if we try to access
it it will get null value
if it is a soft reference GC might
decide that okay I have sufficient space
let's keep it alive so it's upon GC
totally it is allowed to remove it if it
want but GC will say that okay I have
sufficient display let it live for some
more time right so soft is just this
but totally GC is allowed to feed it up
but only do if there is a very shortage
of space okay
okay
understood this one references different
now before we jump into the Heap very
very important I just want to tell you
that how the reference can be changed so
this is a stack
let's say I created this one
a person
obj equals to Nu
person so what will happen in this case
a person object will be created
obj reference will be there in the stack
it will pointing to this
so first if I do this obj equals to null
means what I am doing is
I am making this removing this reference
and storing obj null value
so now garbage collector can invoke and
okay
another way is let's say I so this is
one object and currently
okay so currently it is pointing to this one
one
now I am getting another object person
obj 2 equals to new person
person
okay so what I'm doing is I'm getting
another object so this is uh percent
object one
this is person object two I am creating
a new object and obj 2 is the one so
this is obj one let's say this is obj2
this is storing reference to this one
if I do this
obj1 or this is let's say one obj one
equals to obj2
so means what I am doing is obj1 is now
storing the reference of
this one one
obj1 equals to obj2
so this one
so now here if you see that garbage
Collective and garbage collector invokes
it will freed up this because there is
no reference to this one
so there are different ways like garbage
collector can get info right so there is
no reference to this one it get invokes
and you can manage the references
through which and if Heap is getting
full also then garbage collector got
also involved okay
okay
so whenever object is not present no
reference is present it is allowed to
freed up the memory by the garbage collector
collector
okay so now we know how the what kind of
data stack store what kind of data Heap
stores now get little bit more into the
Heap memory right
now let's go into the Heap memory
I hope you are finding this topic very
so Heap memory is divided into two parts
and there is one more part which is
okay in the previous version of java I
think before Java 7 it is called Prime
Jam Prime Jam but now it is no more use
it is use the meta space it is called as
meta space
okay so this is not a part of Heap
memory so Heap is generally so this is
your HEAP memory
which is divided into two part Young
Generation and old generation
So Young Generation is further divided
Eden s0
s0 S1
S1
this is known as survivors Survivor
Survivor
Survivor space
and this is Eden okay
now let's understand this very very
simple right but very very interesting
how when you create an object
where it restores first
Young Generation
this is your Eden
Eden
this is your s0 Survivor one
Survivor sir s0 S1
okay now I am creating an object one
I am creating a new object one so first
of all whenever you created a new object
it goes inside Edon okay
this is your object one I am writing o1
to save a space
so it is object one
let's say I created another object
object two object 3 object 4 object five
so I have created Five object So
currently everything was empty so I have
created Five object
object to
object 3
object 4
object 5. so five objects are created
inside a Eden now
now
let's say after a periodic time after
some time garbage collector got invoked
so first time garbage collector invokes
now garbage collector do two things so
there is a something called an algorithm
called Mark and sweep algorithm
Narcan sweep I'll go so what it will do
is as a part of First Step mark it will
Mark all the objects which is no more
reference and it is allowed to delete so
let's say object 2 and object 5 is
something there is no reference there is
no reference like this and it is allowed
to be deleted there is no reference
let's say object to so it's market like okay
okay
object to
and object 5
are allowed to be deleted there is no
reference then there is something called
sweep algo now what this sweep algo will
do is it do two things
it will first remove this
it remove this
from the memory
and what it will do is it will sweep
this other the surviving objects into
one of this Survivor extract uh you can
this o1
o1 O3
O3
o4 will come into s0 okay and it will be
removed from here
and this 2 will get deleted
and it will age will be added so age is
its one its age is one its age is one
age is one so means their age is increasing
increasing
right so this process is called minor GC
minor GC minor garbage collector because
it's very fast it happen very periodically
periodically
now let's say second time now let's say
uh another objects created before any
garbage collector runs another object
created let's say obj6 obj7 so where
does obj six and obj7 will be created
let's say here obj6 obj7
obj7 okay
okay
because every time a new object is
created it is created inside the Eden only
only
now let's say
garbage collector got invoked after this
so first it will do Mark so now it will
do a mark into all Eden h0 S1 like
whatever the objects hey which one there
is no reference so let's say
obj7 there is no reference so it's
marking it
obj4 there is no reference it is marking
it now they are eligible for deleting
now sweep will happen so what sweep will
do is it will delete this
remove from the memory and
and
what it will do is that
in the other
so alternatively first it put into s09
now it will put it to S1 so obj6
so object 6 is put here now it's ages 1.
object 1 is put here its age was one now
it's got age increase to 2 ob3
ob3
its age was one now its ages
2 again Plus 1.
and this will get removed obj object 6
is already there with age one so this is
you don't get freedom
this got removed
and this got freedom so if you see that
at a point
Eden would be free after the garbage
collector and one of the s0 and S1 would
be free okay and alternatively we put
the data into s0 as one and we increase
the range
now let's say I have set my threshold
threshold value has like age three
whenever H3 is reached I have to promote them
them
I will tell you what does it mean so now
let's see I have created one more object
let's say object eight so in which
memory object will be created newly here
here
object 8.
okay I have created let's say object nine
nine
now third time garbage collector runs
now garbage collector runs what it will do
do
Mark the objects which there is no
reference so now let's say it's marking
that okay I have to delete this one
I have to delete this one
one
okay now the sweep will happen and what
sweep will do is it will delete this
it will delete this feed of the space
and what it will do is
it will put
object 9 from Eden to this age one
and from S2 it will bring
object 6 Edge is one here then it will two
two
object one
age was two now age will become 3.
now here if you see that one thing
so let's first clean up this object nine
is there object six has been moved to s0
this freedom
and object one has been moved to s0
now here if you see that I have defined
a threshold age of three and after three
I have to do promotion so what does it
so now here if you see that object 1 has
reached its age it has survived this
much time so whenever it survive a
particular threshold it has to do a
promotion and what promotion means is
this object has will be now moved to Old
generation this object one
Okay so now in the old generation only
difference is that
here it is called minor GC here it is
called major GC whenever GC does why
because it first of all whenever the GC
doesn't say here it don't run too periodically
periodically
right maybe let's say here it is run
every one time in 10 second let's say
I'm just saying it right but let's say
in Old generation it might be running a
one time only in half an hour I am just
saying that theoretically that here the
GC runs very less periodically very very
less as compared to the young and also
whatever the objects are present into
Old generation there is kind of a big
objects right they are used too frequently
frequently
right so it takes a lot of time uh so
these are like faster as your Young
Generation right so you can say that
objects created deleted created deleted
so it's very fast but old generation
generally happen is like there are a lot
of references because they are alive
from so long they are alive
from so long so there could be so many
references pointing to them and all
right and they might also have a further
references to them so generally this
process is uh garbage collection is
little bit time taking then
Young Generation but it's uh it has it
do the same thing it first do Mark if
there is no reference and then delete it
but here the garbage collection process
is called major GC here it was called
minor GC
you understood that
young how Heap memory is divided into
Young Generation and old generation and
generation we have Eden and Survivor space
space
now there is something called meta space
right so this is a outside of the heave
and what data it is stored your class variables
variables
I think you have seen the variable uh
topic right you have know what is class
variables every object which you create
through static that is class variables
so it is stored class variables it
store information about the class from
which objects can be created right it
create store constants
right uh you can Define right static
final so these are constant so all this
kind of data metadata information
constant class variables
are stored into the meta space right so
as soon as like Java jvm need need to
load certain class it will load it here
as soon as jvm doesn't need any class so
it will remove it from here right
now we have understood about the Heap right
right
Young Eden Survivor old old generation
is also known as tanion
permanent generation so that is uh PRM
jam it is used to be earlier one now we
call this meta space
I have already told you right so this
was in the old
old Java versions
I think before uh before Java 7 I think
you can check it once I think it is
before Java 7 it is a prime jam and the
major difference between prime jam and
meta space meta space I think from uh
from java 7 or Java 8 we are using metaspace
metaspace
right but here the major difference
between them is like uh
was a part of so you have young you have
old then you have Prime gem so it's a
part of a heap memory and it is not
Expendable so as soon as it will get
filled up
you will get out of memory error
but here meta space is
out of this Heap is now only young and
old and meta space is separate that's
why it is called as non-heap and it is
expanded Expendable as you required okay
okay
so that's the major difference but the
now let's understand about the garbage
collector algorithm which is we are kind
of uh
garbage collector so I think you already
know by here what is garbage collector
or how it get invoked like what is the
purpose of using the garbage collector
and one of the algorithm I have already
so as a part of first phase mark it will
identify water objects need to be
deleted and the sweep it will just
remove those objects from the memory
right so there is something called Mark
and sweep
with compaction compact memory
memory
so what is the difference here is simple
nothing much so here if you see that
uh let's say this space memory space Heap
Heap
so here you have one object which is
identified that it can be deleted there
are objects here let's say
and during the Mark I have identified
what all object need to be deleted let's
say I have identified this identify this
identify this and as part of sweep I
deleted it so I have deleted this
now here if you see that however memory
is generally would be like this so one
data is here one data is here one data
is here but there are certain memory
segments which are freed up here
there are certain memory segments which
are freed up here so with compaction
what happen is it will bring the objects
right it compacted so that we have a
memories fragment in a sequential form
later so that it any new object it can
be added later otherwise it would be
very difficult to put an object in this
fragments right so what it will do is it compact
compact
the remaining objects which survived and
so that we have a feed free of space at
the last and it would be used to put an
object there
okay this is known as Mark and sweep
with compaction
now there are different versions
of GC
first is serial GC
GC
second is
parallel GC
concurrent mark
mark
and sweep
default version of garbage collector in
Java 8.
okay now I'll tell you this is very very
important understand this serial GC now
you know that garbage collector is used
to remove up the memory from the Heap
from young and old both
right so serial GC is that only one thread
thread
only one thread is used and this thread
will work let's say garbage collector initiated
initiated
and this will work and freed up the
space only one thread one thread let's
say so this is called minor GC
and it is called major GC so in when the
minor GC will get invoked only one
thread would be working when major GC
will invoke only one thread would be
working only one GC thread so what are
the disadvantages first of all whenever
you are only one thread is working it
definitely work would be slow say it
would be little bit slow
second thing is GC is very very expensive
expensive
why this is very expensive because
whenever the GC work start whenever the
GC work start all application
application threads
threads
will get paused
so that's why we call that the world
stop when the garbage collector runs so
let's say your application is running
as soon as the garbage collector runs
your application will become pause now
garbage collector will complete its work
and after that it will resume
so if GC is slow then definitely your
application would become slow because
they are pausing too many times
so that's why GC is very expensive task
because when the GC work start all
application thread will pause so this is
one of the disadvantage of Serial GC
that only one thread doing the work of cleanup
cleanup
so in the Java Aid the parallel GC is
used in this depending upon the core
let's say if you have two core CPU four
core so this many threads got initiated
for the garbage collector and they work
parallely right so when there are more
threats definitely it would be little
bit fast and there would be less pause
time but still there is a pause time
right but only thing is multiple threads
are working to freed up the space so you
will get a little bit less pause time
because the far the work of cleanup
would be done little bit faster
but still this is you can say that in
the latest uh j17 and all
there has been work has been done to
further improve this through concurrent
Mark and sweep
concurrent Mark and sweeper says that okay
okay
while your application threads are
working this is your application thread
concurrently GC threads are also working
so it's a concurrent GC thread so your
application thread is working and in
parallel GC thread is also working no
one is stopping
so application threads are not stopping
because of GC threads right but it's not
100 guarantee
right jvm doesn't guarantee that your
application thread will not stop only it
says that I will try my best that your
application threads will not stop I will
try to do concurrent Mark and sweep
concurrent cleanup I will try to do but
I don't guarantee hundred percent and
also there is no memory compaction
happens so whatever the memory got freed
up so let's say there is some segment
Freedom there is certain memory segment
so no compaction happens in this
so then there is a further Improvement
is like G1 so G1 you can say that the
better version of this where it says
that okay
try to give you a hundred percent that
okay your application thread will not
stop and also it brings a compaction
that all the memory is bring together
and all the freedom memories added at
last so that they can be used
so you got it currently Java 8 is using
parallel GC and there is a further in
the latest version of java there is a
further chance that the pause time can
be reduced
to a very minimal so that your throughput
throughput increase
increase
and latency decrease when your
throughput increase means earlier your
application can process 1000 requests
per minute let's say
now because there is less pause time you
can process let's say 1500 requests per
minute so your throughput will increase definitely
definitely
when what will happen is when your
throughput increases means you have uh
threats are not pausing so pause time
has been removed so definitely your
latency will go down you will see the advantage
advantage okay
okay
so that's pretty much I have for you in
memory management and garbage collector
very very important topic please go
through one more time you will
understand it better right and yeah I
think that's it if any doubt please feel
free to ping me in the comment section I
will try to resolve your doubt as soon
Click on any text or timestamp to jump to that moment in the video
Share:
Most transcripts ready in under 5 seconds
One-Click Copy125+ LanguagesSearch ContentJump to Timestamps
Paste YouTube URL
Enter any YouTube video link to get the full transcript
Transcript Extraction Form
Most transcripts ready in under 5 seconds
Get Our Chrome Extension
Get transcripts instantly without leaving YouTube. Install our Chrome extension for one-click access to any video's transcript directly on the watch page.
Works with YouTube, Coursera, Udemy and more educational platforms
Get Instant Transcripts: Just Edit the Domain in Your Address Bar!
YouTube
←
→
↻
https://www.youtube.com/watch?v=UF8uR6Z6KLc
YoutubeToText
←
→
↻
https://youtubetotext.net/watch?v=UF8uR6Z6KLc